Converts most of the maps objects that were still using pre-Pigeon JSON serializations to use structured Pigeon classes instead, mirroring the recent work in the Android implementation:
- Copies the Pigeon definitions from Android, with minor modifications.
- Copies the Dart conversion code and tests from Android, with minor modifications.
- Updates the native code to eliminate a lot of JSON boilerplate.
In addition to adding type safety, this mostly finishes addressing technical debt dating back to the initial federation of the plugin, where native code in the implementation package is relying on the JSON serialization of objects that is implemented in the platform interface package, meaning that the stringly-typed data had to match *across packages* in addition to languages.
This also backports some Dart unit test improvements to the Android implementation. While bringing the test code over I noticed that the expectations were based on running the Pigeon serialization and then asserting things about the results, which I missed in review. That approach is very fragile because the Pigeon serialization is an internal implementation detail of Pigeon and subject to change at any time. Instead the tests should be using the object directly.
Part of https://github.com/flutter/flutter/issues/117907