Add 'top' flag to allow Gadgets to top-load

Obviously this should be used sparingly, but it's needed for some
initialization stuff like registering plugins with VisualEditor.

Change-Id: Ifeed524a53601a47b3a945ca0a324bbbead0f1f5
Merge "Add 'top' flag to allow Gadgets to top-load"