fix for improvement/issue #5559

ServiceManager::getRegisteredServices()

There are occasions that you may want to see specific list of certain sm content like 'instances'. This pr makes improvements on getregisteredservices() instead of having a new method hasInstances()

this is a minor improvement and should not affect anything.