PG support, plus fixes for rake

Here is some additional error handling to make makara work with the postgresql adapter.

We also found that some activerecord rake tasks asplode when you use any database adapter other than mysql, postgresql, sqlite or something called firebird. These are matched by duplicated case statements scattered throughout the activerecord rake files, and which are impossible to extend without hard-coding new adapters in.

We added some rake tasks which rewrite the activerecord configurations when running these AR tasks, to fake as if it is not there. This works for our deployment, but there may be other stray tasks which we missed.