Create reliable method of checking if hostnames refer to same host

This has been a problem for a while now with checking host equivalency. This method should accurately say whether two hostnames are identical.