Restricted API for clients during upgrades

When an upgrade is in progress clients will be given an API root that
only allows a small subset of read-only API calls. Other API calls
will return an "upgrade in progress" error.

This helps to ensure that no state changes occur during an upgrade. An
attempt to change state while schema migrations are happening could be
problematic.