refactoring in preparation for #3471 (cdmlib-remote-webapp instances can be stopped / started individually)