Dynamical theory of RHEED from stepped surfaces