Refactor dynamic Gadget creation
This does not change behavior, just cleans up the logic. There are now two
methods for registering gadgets, the first one handles out-of-order types
and early return for existing objects. The second method, registerGadget,
handles the creation of dynamic enum and gadget types.
This adds a handleEnums() method to put enum processing in a single method.
This will be used for dynamic QRemoteObjectReplica objects in a future
change.
Change-Id: Id4ecc97bd1614d7bce55a96521b667bc1c51089c
Reviewed-by: Michael Brasser <michael.brasser@live.com>