EDIT: There's a list of reserved TLDs that won't be allowed to be registered. It includes localhost (but not mail)!
AFRINIC IANA-SERVERS NRO ALAC ICANN RFC-EDITOR APNIC IESG RIPE ARIN IETF ROOT-SERVERS ASO INTERNIC RSSAC CCNSO INVALID SSAC EXAMPLE* IRTF TEST* GAC ISTF TLD GNSO LACNIC WHOIS GTLD-SERVERS LOCAL WWW IAB LOCALHOST IANA NIC
(example and www have asterisks next to them because "in addition to the above strings, ICANN will reserve translations of the terms “test” and “example” in multiple languages. The remainder of the strings are reserved only in the form included above.")