(maint) Make Resource::Type use the CodeMerger strategy

This makes the Type.merge method use the CodeMerger instead of
relying on that code knows how to merge itself with any other kind
of code. The CodeMerger is parser specific and is obtained from the
ParserFactory. This way the choice of parser is hidden from the
Type.merge logic.