Added Postgres Support. Requires 9.1+

This adds support for Postgresql databases.  Minimum version 9.1 required.

This has only had basic testing, in which it was able to record and look up block breaks.  the actual SQL changes are very minimal and mostly related to table/index creation and column quoting. also a fix for postgres' more strict group by syntax, which, as far as I can tell, could be safely merged into the mysql version of the query, but I didn't want to modify that without reason.