QTypedJson: support custom doWalk methods
Object types already had a "walk" method to declare their fields, but
custom value types like IdType used to require changes to the magic
doWalk() method to be able to be (de)serialized correctly.
Add custom doWalk method mechanism to QTypedJson for non-objects types,
where non-objects type can define a doWalk method that describes how to
(de)serialize them. Implement it for IdType and add a test: the previous
IdType (de)serialization used to construct an incomplete object instead
of a string/int/null value.
Amends 8ef06009e4f33ac45ef6f1a6e4f16656a213c2f3.
Pick-to: 6.12
Change-Id: I15283bd17400e9b7918cbd96f260eb683215893f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>