feat: add subtype module (2.21)
Adds a module that allows subtype to be registered without annotating the parent class.
It is implemented on SPI.
See https://github.com/FasterXML/jackson-databind/issues/2104
Its original version is https://github.com/black-06/jackson-modules-dynamic-subtype.
I removed the custom ServiceLoader and always use the standard library, which means that pojo always needs a no-parameter constructor.
Quick note: due to timing, decided that I will not try to get this in Jackson 2.16 -- so will need to be re-based to 2.17. This because there's a bit of work to be done here.
For example, I think that naming of @JsonSubType should change as the general rule is that only jackson-annotations has annotations with name starting with @Json (and for legacy reasons, some in jackson-databind).
Modules can provide annotations that start with @Jackson prefix (or anything else that makes sense).
But I need to read the PR in bit more thought to make sure my feedback is relevant.