Coherence approach in neutron, x-ray, and neutron spin-echo reflectometry