Receiver Training for Efficient Nonlinear Equalization and Detection in Optical Communications