PDB-70 Add index on catalog_resources.exported

This increases performance for exported resource collection queries. For
postgresql the index is only a partial on exported = true, since indexing on
the very common 'false' case is not that effective.

Signed-off-by: Ken Barber <ken@bob.sh>
Replace insert-values with a select query for postgresql <= 8.1

Returning support was not added until PostgreSQL 8.2. This code has instead
been modified to fake it for PostgreSQL 8.1 by doing an SQL query on the
data in question after inserting.

This concept is known as RETURNING and was added in 8.2 as documented
in E.24.1 of the 8.2 guide:

    http://www.postgresql.org/docs/8.2/static/release-8-2.html

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-84 Update to latest version of PostgreSQL JDBC driver

The PostgreSQL upstream finally has uploaded a new revision of their JDBC
driver, but to a new organisation name on maven it seems:

    http://mvnrepository.com/artifact/org.postgresql/postgresql

As linked from their download site:

    http://jdbc.postgresql.org/download.html

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #749 from kbarber/maint/master/bug-in-postgresql81-from-hash-to-id-change

Replace insert-values with a select query for postgresql <= 8.1
Merge pull request #750 from kbarber/ticket/master/PDB-84-latest-jdbc-version

PDB-84 Update to latest version of PostgreSQL JDBC driver
Merge pull request #747 from kbarber/ticket/master/PDB-70-index-on-the-exported-column

PDB-70 Add index on catalog_resources.exported