Spectra of composition operators on the bloch and bergman spaces