Fix problems destroying the composer.json

The regexp replacement of the contao version sometimes destroy the
composer.json. Now it is using the class JsonFile that should work
better.
Prevent direct access to static::$runonces while generating runonce executor.
Mark installer supports legacy-contao-module packages.
Add support for legacy modules and shadow copies.
Make contao root dir configurable with { extras: { contao: { root: "relative path to root" } } }.