Add PostgreSQL database driver

This is regarding [bug 3849](https://bugs.alliedmods.net/show_bug.cgi?id=3849).
Adds a "pgsql" driver to the dbi system.

See https://forums.alliedmods.net/showthread.php?t=236415

The AMBuild changes are very likely wrong. I don't know how to use it ;)

Here are some instructions on how to create static libs of the libpq out of the [source](http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.gz)

Get the latest postgresql source.
extract it.

=============
Windows:

In a VS-commandline, navigate to src/tools/msvc and run
  perl mkvcbuild.pl
to generate the VS solution in the root.

1. Open the pgsql.sln in VS2010 
2. change the configuration type of the libpq project from "Dynamic library (.dll)" to "Static library (.lib)"
3. under C/C++ -> codegeneration change runtimelibrary from "Multithreaded-Debug-DLL (/MDd)" to "Multithreaded-Debug (/MTd)" for the libpq and libpgport projects
4. compile the libpq project
5. the static .lib will be in Release/libpq/libpq.lib and Release/libpgport/libpgport.lib

==================
Linux:

in the extracted postgresql source run
  ./configure LDFLAGS='-static -m32' CFLAGS='-m32' --prefix=`pwd`/build
You might need to add --without-readline. This is not needed for the libpq library.
  cd src/interfaces/libpq
  make install
  rm libpq.a
  make install enable_shared=no
The library will be in the build/lib directory.

About that double linking to get a good static library: http://www.postgresql.org/message-id/1902207738.20070920111734@comodo.com
@peace-maker Something like this should work: https://gist.github.com/dvander/496af643026e1b0cf1d0

This invokes `patch` with a patch file from inside the source tree, against a file from outside the source tree, placing the output file inside the build folder.

It's important to note two things: (1) AMBuild cannot handle a file that is both an input and output. That means you can't patch in-place. You have to have separate inputs and outputs. (2) When tying commands together, you have to get the inputs right. With `patch` that's easy. For running `configure`, you'll need to pass the output of `patch` as an input. For example,

```
_, patch_outputs = builder.AddCommand(patch_argv, etc...)
_, autoconf_outputs = builder.AddCommand(
    inputs = patch_outputs + [...anything extra?],
    argv = ['configure'],
    outputs = ['configure'],
)
builder.AddCommand(
    inputs = autoconf_outputs + [... anything extra?],
    ...
)
```