sys_parameters' parameter_code shouldn't be empty

Doesn't make sense to have it default to an empty string, we should
require a value.
Allow custom delta files in db patcher.

The upgrade_base's patchDb function only takes delta_*.sql files, where
* is a number. I needed it to run additional delta files according to
iPeer version and so added the $additionalDeltas param, where you can
state additional delta files for the patcher to run after the main delta
files has finished.

Note that I removed the $dbconfig param in patchDb cause it didn't seem
to be used anyway.

Also added exceptions to upgrade_300 so that it doesn't run when we're
already in an iPeer v3.0.x database. In fact, had to add this exception
to the upgrade_controller too so that the correct database versions will
be displayed when upgrading to v3.1.

Had to force a SysParameter reload on login as I was having problems
where the SysParameter changed in the database but wasn't reflected in
the cache even after I've logged out.
Upgrade script from iPeer v3.0.x to 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.