Allow localhost as hostname

***What:***
Changes `isHostname` and `isHostnameOrIp` so that localhost is an accepted parameter.

***Why:***
The DNS, MySQL, MSSQL checks should be able to be configured to allow for localhost being used in their details, but not for the target.  This means we can query localhost with DNS and can set the SQL host to localhost (current you can already set it to 127.0.0.1).

These functions are not being used when validating the target host.