Also does some reorganization/cleanup on the magic vars/delegated variable generation portions of VariableManager to make the above possible. Fixes #12633