Upgrade script for v3.1.

Delta files to bring an iPeer v3.0.x database up to v3.1 schema.

There's 2 main difficulties with this update:

The database entries we use to judge database version wasn't properly
inserted in earlier versions, so other factors had to be used to judge
database version. This update will properly insert these versions.

There are differences between upgrading from a v2.x installation and
from a v3.0.x version. Thus requiring the delta_6a and delta_6b files,
each has sql statements that are only valid when upgrading from a
specific version.

Note: config/core.php contains the database version that this version of
the code will work with, must remember to change it if we ever write
another update.