Geometric phases for nonlinear coherent and squeezed states