Managed repository template path expansions

Refactors managed repository template path expansion to allow extra terms. Testing should be inspired by https://github.com/openmicroscopy/ome-documentation/pull/836 at http://www.openmicroscopy.org/site/support/omero5-staging/sysadmins/fs-upload-configuration.html. Try setting `omero.fs.repo.path` to various values then importing.
There seem to be quite a few `/omero5`/ URLs around; in this case I had just adjusted the one about `omero.search.locking_strategy`. If @hflynn judges that we need `/omero/` URLs it might be worth a separate PR to fix them more widely.