[ServiceManager] Implemented circular alias reference detection

ServiceManagers that allow overwriting the service definition may
contain circular references which will cause an infinite loop. 

I extracted the alias resolving code to a protected method that will detect
circular references and throw an exception if one is encountered.