Ie checks

I had a quick poke at this.

Instead of rewriting all the browser sniff checks, I created a capabilities function which is designed to give you a single place to ask if a browser knows how to do a given thing. The idea is to avoid all the copypasting the next time this crops up.

If this looks ok, there's a bunch of other boilerplate scattered around the place that looks like it's ripe for refactoring to use this model.

/cc #1056