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
could, but it seems weird to be implicitly returning `null` by having short-circuited earlier if `err` wasn't `null` instead of just returning `null`