XBlocks are something initialized before all resources (url) are loaded

I had some issues with the latest master with one of my xblock, especially when playing with the Studio edit. The xblock was initialized before my main init function was fetched and executed from the server. After some investigation, I noticed that the promise of the resources was simply not taken into account.

This PR fixes the issue. Basically, it waits that all fragment resources are loaded and rendered before trying to call the init function.

Let me know if you have any concern or modification you'd like.