Asynchronous dependency injection using Q Promises