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 fixe the issue. Basically, it wait that all fragment resources are loaded and rendered before trying to all the init function.

Let me know if you have any concern or modification you'd like.