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.
aboutToRestoreRoot, restoreInProgressRoot and upgradingRoot are all very similar and should share a common underlying code. They all return a specific error for all API calls except for a specified set of calls. This should be easy to abstract to avoid all the duplication. 

Each of these roots could just be an instance of a single "restrictedRoot" type.