Factor abstract base class IDLCompiler, concrete class IDLComplierV8

This factors out the code common to all IDL compilers to IDLCompiler,
an abstract base class, and puts the V8-specific code in a concrete class.
This makes reuse easier, and has been requested by Terry (Dart) and Yosi
(Closure), and in any case makes the code very generic.

Also regularizes write_file(), so it's always on full file contents
(previously had 2 versions, one for full file contents (suitable for Jinja),
one for line-by-line (legacy from Perl)).

...and renames compile() to compile_file(), due to existing
built-in function compile() (causes misleading highlighting).

BUG=341748
R=haraken

Review URL: https://codereview.chromium.org/189543008

git-svn-id: svn://svn.chromium.org/blink/trunk@168824 bbb929c8-8fbe-4397-9dbb-9b2b20218538