Implement Loader.define method

Implement AMD like require function. The user should provide callbacks
for success and failure instead to use Promises.