Schematics context now have an (optional) analytics field that, if set,
should be used to report usage. This can be set even in some cases where
analytics is disabled (to a noop analytics).
1. update the return type of 'validateOptionsWithSchema' to make it
conform the signature of engineHost.registerOptionsTransform
2. fix minor naming issue
And receives in its constructor the enginehost and registry. This simplifies the creation
of the NodeWorkflow, or later on the Google3Workflow etc, since all the duplicate logic
is now in a single base class.
This is yak shaving for internal stuff.
This should clean up the code a bit.
Note: at first I added the no-useless-cast rule, but after getting frustrated
with it (as it has many false positive), I decided to remove the rule but some
useless casts were removed so I let those in the PR.