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.
Return 503 OCS response with requested format
Merge pull request #9306 from owncloud/publicneedsupgrade

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