Update services plugin framework

Added computation of service category instances to enable more intelligent update of server.xml by service plugins.
Added new utility methods and rspec test for them.