Theoretical and experimental studies of surface processes in the course of molecular-beam epitaxy of gallium nitride