Fix Studio's XBlock dependency loading issues

STUD-1465

Changed the XBlock rendering logic to use promises to track asynchronous tasks.
Each dependency is then only loaded once the previous one has completed, and the
XBlock initialization only happens once all dependencies are loaded. This gives
XBlocks the same semantics in Studio as they get when shown directly on a page.
Merge pull request #3046 from edx/andya/fix-xblock-loading-in-studio

Fix Studio's XBlock dependency loading issues