Simplify MetaInsertionFactory down to one implementation

Uses reflection instead of conversion, easier to understand and to change in the
future.

Other minor cleanup.

Extracted from #1600