Avoid starting a maintenance task on the server when
the repository connection (configuration) is read-only.
Also:
* Check for read-only repo before running maintenance.
* Move direct repo check to startMaintenanceManager.
* Rename function as maybeStartMaintenanceManager.
The name reflects that the function may not start a
maintenance task manager.
* Add connect options to repotesting.
* Add test for maintenance on read-only repo.
- Fixes: #4373