rlmesh_episode_state_len
On RLMESH_OK value (and free_value, NULL = none) pass to the state, and replacing a key frees the old value first; on nonzero free_value is not called, the caller still owns value, and the state is unchanged. Re-setting the same pointer keeps the value alive and updates its free function without calling the previous one.
size_t rlmesh_episode_state_len(const RLMeshEpisodeState* episode_state)