Allow language inheritance (i.e. SVG extends XML)

Fixes #3044
[now in master] Depends on / contains #3051 (Made Language.addFileExtension public)