Fixing todos, adding more tracking

- The DB class is now loaded from that specified in the config file (though the WPDB class is still the only one available).
- The WPDB class can now be configured based on stuff in the bStat options, this is useful if you want to use a different db/host for activity tracking.
- The JS is very different and now tracks referring sites, query phrases from recognized search engines, and UTM codes. It's in a sad state now, but it seems to work.