Reverses of the Schwarz inequality in inner product spaces and applications