Mott-insulator shells in the three-dimensional Bose-Hubbard model with harmonic confinement