New TSD compiler.

TSD, Template Scanner Compiler, is a compiler that takes a tsd input
file with scanner rules, and compiles it into a efficient template
scanner.

Why?
As it will now be easier to maintain different flavors of the
template scanner.
Also improvements and bugfixes applied to the compiled scanner
will benefit all flavors.

Example:
In zotonic they currently have their own fork of erlydtl, where a bug
fix has been applied to correctly track line numbers within multiline
comments. This bug is still not fixed (maybe not even known about!)
in the main erlydtl project.

TODO:
Document the TSD file format (a little too early still, as it is evolving,
but waiting too long, and the risk of it not being written is obvious).
Add support for .tsd files to rebar.
Let rebar decide if we need to recompile .tsd files.
Add scanner benchmark.

Current values on my machine:

Running benchmarks for 2 seconds on 1388 bytes (bench.dtl)...
Running erlydtl_new_scanner, hold on... ok
Running erlydtl_scanner, hold on... ok
erlydtl_new_scanner scanned   4171 times in 2.000 seconds @ 2826.8 Kbytes/sec
  min 0.000 max 0.002 avg 0.000480
erlydtl_scanner scanned   4886 times in 2.000 seconds @ 3311.4 Kbytes/sec
  min 0.000 max 0.003 avg 0.000409
Deltas
  Count     :     -715.000  -14.6%
  Total time:        0.000    0.0%
  Min       :        0.000      ~%
  Max       :       -0.001  -33.3%
  Avg       :        0.000   17.1%
  Kbytes/s  :     -484.580  -14.6%
Done.
Refactor generated scanner to be more efficient.

Running benchmarks for 2 seconds on 1388 bytes (bench.dtl)...
Running erlydtl_new_scanner, hold on... ok
Running erlydtl_scanner, hold on... ok
erlydtl_new_scanner scanned   7039 times in 2.000 seconds @ 4770.6 Kbytes/sec
  min 0.000 max 0.002 avg 0.000284
erlydtl_scanner scanned   4918 times in 2.000 seconds @ 3333.1 Kbytes/sec
  min 0.000 max 0.003 avg 0.000407
Deltas
  Count     :     2121.000   43.1%
  Total time:        0.000    0.0%
  Min       :        0.000      ~%
  Max       :       -0.001  -33.3%
  Avg       :       -0.000  -30.1%
  Kbytes/s  :     1437.475   43.1%
Done.
Give proper compile error messages to rebar.
Add a few missing tags.
Add missing pieces to pass all tests (except the verbatim ones).

(a few stray files lingering from my move out of the erlydtl repo...
 will clean up in a later commit..)
Better error reporting in embedded code form/expr sections.
Support verbatim tags.

Copied more or less straight off of the old scanner.

Performance doesn't seem to have been hurt at all by the addition of the verbatim tag support.

Running benchmarks for 10 seconds on 1388 bytes (bench.dtl)...
Running erlydtl_new_scanner, hold on... ok
Running erlydtl_scanner, hold on... ok
erlydtl_new_scanner scanned  33291 times in 10.000 seconds @ 4512.5 Kbytes/sec
  min 0.000 max 0.004 avg 0.000300
erlydtl_scanner scanned  22958 times in 10.000 seconds @ 3111.9 Kbytes/sec
  min 0.000 max 0.006 avg 0.000436
Deltas
  Count     :    10333.000   45.0%
  Total time:        0.000    0.0%
  Min       :        0.000      ~%
  Max       :       -0.002  -33.3%
  Avg       :       -0.000  -31.0%
  Kbytes/s  :     1400.606   45.0%
Done.
TSD: add prio to rules, and tidy up the syntax a bit.
Make sure tsd rules are sorted according to their prio.
Work in progress on documenting the TSD language..
tsd: support escape sequences in quoted strings. Support extra tsd definitions in extra_data option.
Get into a compiliable state.

Renamed project from working name TSD (Template Scanner Definition)
to slex (Stateful Lexical Analyzer Compiler).