Forward-port 2.6.3 upgrade script

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
Re-order parts of 0887 upgrade script

Based on feedback from dbs, in PostgreSQL 9.1, the order to which we
fix up these functions matters.  So drop if exists first, then create
new.

Signed-off-by: Ben Shum <bshum@biblio.org>
Update 2.6-2.7.0-upgrade-db.sql to reflect that it actually starts from 2.6.3 and up.

So, actually, the 2.7 upgrade path needs to include everything up to 2.6.3 to get all
the fixes.

Signed-off-by: Ben Shum <bshum@biblio.org>