Fix hash links going to tabs on index page

As discussed in #15, It turns out #4 had the unintended side effect of overriding the initial tab, even if it's given as a hash - e.g. ``astropy.org/index.html#dev`` would still go to whatever your OS is, instead of the developer docs.  This adjust the javascript to prevent this from happening.

It also has a few random clean-ups in functions.js, mostly because my editor sanitizes whitespace automatically.