Use localhost hostnames in tests to ensure self hosted name resolution

https://bugzilla.mozilla.org/show_bug.cgi?id=995806