Supernova neutrinos: Earth matter effects and neutrino mass spectrum