Two-dimensional electron transport in semiconductor layers. I. Phonon scattering