fix for improvement/issue #5559

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