add support for postgres datastore

This pull request does a few things:

  1. Defines a `GearmanDatabase` base class
  2. Converts the old sqlite code to an implementation of a `GearmanDatabase` (`SQLite`)
  3. Adds a `Postgres` implementation of `GearmanDatabase`, and makes it the default (and currently only) option
  4. Adds tests for the `GearmanDatabase` interface, testing both the `Postgres` and the `SQLite` implementations
I refactored these tests now in 84f645aad06b1f5c08e555bf675c4de2e6593e0f. Let me know what you think!