An hp-analysis of the local discontinuous Galerkin method for diffusion problems