Do database checks on upgrade only for versions that contain new fixes

The "lastUpgradeVersion" value was stored as a string with the value of the package version name (e.g., "2.0.3beta1"). This commit replaces this preference with the int value of the version code to allow us to compare it by version number.
Merge pull request #157 from hssm/upgrade-dbcheck-by-version

Do database checks on upgrade only for versions that contain new fixes