Use Feature Detection instead of Browser Sniffing

While the previous implementation used feature detection, it was using
it wrong. It was, essentially using feature detection as a more advanced
browser sniffer.

* Updated this to detect the features actually being used to measure
  zoom.
* Moved the functions to the same place as the checks, to make it
  easier to keep the 2 connected.
* Made some adjustments so it passes jshint.