The Redshift-Space Two-Point Correlation Functions of Galaxies and Groups in the Nearby Optical Galaxy Sample