core: fix upgrade scripts gap validation
core: fix upgrade scripts gap validation

Current implementation of upgrade mechanism does not allow subsequent
scripts to have more than a 10 gap in their numbering.
For example, if last installed script is 03011500 then a subsequent
upgrade with 03011501 to 03011510 is OK while 03011511 03011512 and so
forth will be rejected.
This patch fix bug when moving to another major version , for example
from 0301 to 0302. It adds a condition that checks for gaps between two
subsequent versions only if their major version (first 4 digits) match.

Change-Id: Id260d437914911c71cc2ea22d9a0314e62d72c78
Signed-off-by: Eli Mesika <dc8a2a200abf66067593de2e51fee9376f06ea0f@redhat.com>

yingyun001/ovirt-engine,zerodengxinchao/ovirt-engine,walteryang47/ovirt-engine,walteryang47/ovirt-engine,OpenUniversity/ovirt-engine,yingyun001/ovirt-engine,OpenUniversity/ovirt-engine,OpenUniversity/ovirt-engine,OpenUniversity/ovirt-engine,eayun/ovirt-engine,zerodengxinchao/ovirt-engine,halober/ovirt-engine,yingyun001/ovirt-engine,yapengsong/ovirt-engine,yapengsong/ovirt-engine,zerodengxinchao/ovirt-engine,halober/ovirt-engine,eayun/ovirt-engine,eayun/ovirt-engine,yapengsong/ovirt-engine,eayun/ovirt-engine,zerodengxinchao/ovirt-engine,zerodengxinchao/ovirt-engine,walteryang47/ovirt-engine,eayun/ovirt-engine,yapengsong/ovirt-engine,yingyun001/ovirt-engine,walteryang47/ovirt-engine,halober/ovirt-engine,yapengsong/ovirt-engine,halober/ovirt-engine,walteryang47/ovirt-engine,OpenUniversity/ovirt-engine,yingyun001/ovirt-engine