[FLINK-17954] [core] Demux legacy remote function state on restore

This commit adds backwards compatibility for versions 2.1.x, by
performing state migration to demultiplex the PersistedTable used for
remote function states into PersistedValues.

We intend to only have this backwards compatibility for one version
only. Therefore, the plan is to revert these changes for 2.3.x.
This means if a user intends to upgrade from 2.1.x to 2.3.x, they need
to first upgrade to 2.2.x.

This closes #126.
This closes #125.
5 files changed