Return 503 in  public.php and OCS API when upgrade is due

To prevent unexpected behavior, public.php and the OCS API calls will
return 503 Service Unavailable when an upgrade is due.

Hopefully fixes cases like https://github.com/owncloud/core/issues/9295

Please review @jancborchardt @DeepDiver1975 @karlitschek @icewind1991 
For the OCS API I should be able to hard-code a response, yes.
Makes sense.