[CA-49870] Enable slave to reboot under HA if statefile access blocked.
[CA-49870] Enable slave to reboot under HA if statefile access blocked.

This change moves the slave's call to SM.register to a later position in
the startup sequence - in its previous position it would attempt to
make a database call to the master before the master connection had been
setup.

If HA was enabled, this database call would happen before the
slave had realised it needed to wait for statefile access, and xapi
would fail to start.

Signed-off-by: John Else <37b74501daa612e48fea94f9846ed4ddeb6a8f07@citrix.com>

koushikcgit/xen-api,huizh/xen-api,Frezzle/xen-api,jjd27/xen-api,ravippandey/xen-api,djs55/xen-api,cheng--zhang/xen-api,koushikcgit/xen-api,rafalmiel/xen-api,jjd27/xen-api,salvocambria/xen-api,euanh/xen-api,cheng--zhang/xen-api,guard163/xen-api,anoobs/xen-api,agimofcarmen/xen-api,simonjbeaumont/xen-api,jjd27/xen-api,thomassa/xen-api,euanh/xen-api,Frezzle/xen-api,cheng--zhang/xen-api,thomassa/xen-api,djs55/xen-api,huizh/xen-api,Frezzle/xen-api,koushikcgit/xen-api,djs55/xen-api,jjd27/xen-api,koushikcgit/xen-api,robertbreker/xen-api,vasilenkomike/xen-api,cheng-z/xen-api,koushikcgit/xen-api,simonjbeaumont/xen-api,ravippandey/xen-api,vasilenkomike/xen-api,robertbreker/xen-api,thomassa/xen-api,vasilenkomike/xen-api,euanh/xen-api,rafalmiel/xen-api,koushikcgit/xen-api,robertbreker/xen-api,simonjbeaumont/xen-api,salvocambria/xen-api,djs55/xen-api,srowe/xen-api,vasilenkomike/xen-api,rafalmiel/xen-api,thomassa/xen-api,cheng-z/xen-api,simonjbeaumont/xen-api,Frezzle/xen-api,cheng--zhang/xen-api,euanh/xen-api,cheng-z/xen-api,huizh/xen-api,cheng-z/xen-api,djs55/xen-api,anoobs/xen-api,huizh/xen-api,cheng--zhang/xen-api,huizh/xen-api,robertbreker/xen-api,agimofcarmen/xen-api,euanh/xen-api,djs55/xen-api,salvocambria/xen-api,agimofcarmen/xen-api,guard163/xen-api,jjd27/xen-api,guard163/xen-api,cheng-z/xen-api,cheng-z/xen-api,salvocambria/xen-api,Frezzle/xen-api,cheng--zhang/xen-api,salvocambria/xen-api,guard163/xen-api,simonjbeaumont/xen-api,salvocambria/xen-api,robertbreker/xen-api,huizh/xen-api,srowe/xen-api,robertbreker/xen-api,anoobs/xen-api,rafalmiel/xen-api,srowe/xen-api,ravippandey/xen-api,srowe/xen-api,guard163/xen-api,anoobs/xen-api,rafalmiel/xen-api,agimofcarmen/xen-api,agimofcarmen/xen-api,cheng--zhang/xen-api,anoobs/xen-api,vasilenkomike/xen-api,simonjbeaumont/xen-api,thomassa/xen-api,cheng-z/xen-api,thomassa/xen-api,srowe/xen-api,ravippandey/xen-api,ravippandey/xen-api,anoobs/xen-api,agimofcarmen/xen-api,ravippandey/xen-api,rafalmiel/xen-api,jjd27/xen-api,euanh/xen-api,vasilenkomike/xen-api,guard163/xen-api