Improving pre-hash logic

With this diff, all elements in testcases =
["www.google.com","http://www.google.com","google.com"]
will be turned into google.com before hashing.

The URL handler can already process URLs generated by this.