Code to enable a point in time recovery plugin:
 - add command line option to start up in maintenance mode
 - some bgsync refactoring
 - add inMaintenanceMode function
 - auth stuff