Model atmospheres and thermal spectra of magnetized neutron stars