watcher: fix startup sequence locking the master
watcher: fix startup sequence locking the master

Currently, the watcher startup sequence does:
  - open a luxi client
  - get the instance list
  - get the node boot ids
  - open and lock the status file, and:
    - archive jobs
    - restart the down instances
    - check disks

This, of course, can lead to problems when a node is (genuinely or not)
locked for more than (watcher interval * maximum query clients) time. At
that time, the master is completely unresponsive until the node is
unlocked and all the watchers exit with error due to the state file
being locked by the first instance.

This patch reworks the startup sequence to first open/lock the status
file, and only then open a luxi client. This should prevent the above
case.

Reviewed-by: ultrotter

mbakke/ganeti,mbakke/ganeti,leshchevds/ganeti,apyrgio/snf-ganeti,andir/ganeti,mbakke/ganeti,ganeti/ganeti,apyrgio/ganeti,onponomarev/ganeti,grnet/snf-ganeti,yiannist/ganeti,yiannist/ganeti,andir/ganeti,grnet/snf-ganeti,bitemyapp/ganeti,andir/ganeti,ganeti-github-testing/ganeti-test-1,ganeti/ganeti,leshchevds/ganeti,apyrgio/ganeti,apyrgio/snf-ganeti,ganeti/ganeti,leshchevds/ganeti,bitemyapp/ganeti,dimara/ganeti,dimara/ganeti,yiannist/ganeti,onponomarev/ganeti,ganeti-github-testing/ganeti-test-1