fixed requiring upgrade message.

When we go from master to dev for example, a database upgrade is
needed; so when we log into the system as a super administrator
we will get a red alert message. The problem is after we have gone
through the upgrade process and log back into the system, the alert
message still appears.

The reason is in the core, we have set the expected database version
to 8 but the upgrader only upgrades to delta6a/delta6b (version 6).
This was fixed by changing the upgrader to update to the same version
set in the core. After doing so we have found a problem with running
delta7 and delta8.

The problem is they were trying to add a system parameter called
"database.version", which already exists. To fix this I have modified
the script to update the parameter instead.
fixed event model tests

Some tests were broken due to the array returned being in a different order
than expected. To fix it, I have ordered the the returned array before
checking whether the results are correct.