Add Restore Mode to stop api calls while restoring

The main goal of this PR is to prevent data loss
during the different steps of the restore process.
This will be used by restore once it lands.
This is the basic required functionality for this
API server mode.
Following a feaure implemented for Upgrade, an
api root server that can selectively allow API
commands depending on the Restore step we are
running.
When we are preparing a restore: that includes
uploading files if required for instance, the
API will only accept Client.Restore to be
triggered in order to avoid data loss when the
restore runs.
When Restore is running no calls will be allowed
since state server will be down.
Is there a reason you've moved the validator check to after the code that follows?  I'm guessing the intention was to fail *before* that code ran if the validator failed.