Rejig URL string sniffing to be more robust

* Don't use Apple's URLWithString method, it's flaky
* support for ports in the URL
* support for whitespace in the path (e.g. http://google.com/?q=my search string )
* support for 'localhost' URLs
* Better validation of IP addresses
* Correctly apply the scheme when it doesn't exist in the URL string
* Tidy up the sniffString: method to allow for tests after the URL test (it doesn't necessarily have to be last anymore)
Create a script for scraping the list of Iana TLDs
Update the list of valid TLDs (date: 06/01/13)
Merge pull request #1312 from pjrobertson/sniffURLs

Rejig URL string sniffing to be more robust