Deprecate Variable hooks in favor of custom Variable types.
This change adds DeprecationWarnings when Variable hooks (on_get_value, on_set_value, etc.) are used. The recommended approach is now to create a custom Variable subclass and overload methods like `get_value` and `set_value`. The summary test has been updated to reflect this new pattern.
PiperOrigin-RevId: 903324071