Rewrite the mterp code generator and the template snippets.

This changes the code generation, but the generated assembly
files are unchanged (except for some whitespace differences).

This replaces the custom template meta-language with python.

All the architecture-specific template files are concatenated to create
one big python script. This generated python script is then executed to
produced the final assembly file. The template syntax is:
 * Lines starting with % are python code. They will be copied as-is to
   the script (without the %) and thus executed during the generation.
 * Other lines are text, and they are essentially syntax sugar for
   out.write('''(line text)''') and thus they write the main output.
 * Within a text line, $ can be used insert variables from code.

This makes the code generation simpler and it will make it possible
to use full power of python within the snippets to simplify code.

Test: test-art-host-gtest
Change-Id: I8325ca406b328f82163241b3d698f94de5e38bff
1779 files changed