Updating versioncheck.php

Bug 1215662

Make sure the version number is 10 digits.
Check the version number in the committed version.php, not the filesystem
Make sure new upgrade.php sections match with version.php
Add support for checking plugin versions as well
Make precommit version check only look at plugins that have changed
Drop debugging from versioncheck.php

Change-Id: I7307d2be0d5d8c49e385a5f8cd907d1405bade97