The exceptional points of non-Hermitian optical systems: Scattering matrix definition, coherent perfect absorption, and lasing