Use queue chaining to simplify code.
Test that iframe gadget loading error is correctly propagated.
Ensure that gadget dependencies are loaded in the right order.

Thanks to Thibaut Frain for this patch.
Drop useless spaces.
Release version 0.5.1
Drop useless gadget parameter to the selector.
Release version 0.6.0