Cvar: make sure the vtable is set up when Register is called.

In the inheritance chain leading to CvarProxy, the registration was done
by CvarProxy which caused problem when the Cvar system tried to validate
values using the CvarProxy pointer because the vtable was not set.
Implement VM proxies for Cvars, put common proxies in the same file.