Three-pion forces and nucleon-nucleon interaction in a field-theoretical model