Generalized Laue dynamical theory for x-ray reflectivity at low and high incidence angles on ideal crystals of finite size