Fixed the failing unit-tests, plus style fix-ups.

Note that some of these tests, like the User-Agent tests, are specific to UIWebView and are treated as such. The StartPage test should also work for WKWebView, and should be changed to support that as well, although it is not trivial.