Squeezing in two-photon optical bistability and laser with injected signal