Massively improve hostname validation

Change-Id: I910a715d86f56dc6fadf63cb52d2a4850a17a785