Tweaks to tokenizing and bug fixes for escaping of behavior switches

* While debugging RT failures on en:Duke_of_Aveiro because of
  excessive nowiki escaping, discovered that escaping was getting
  tripped by behavior switch tokenizing. Then discovered that the
  existing wikitext escaping was completely missing escaping
  for magic-words.

* This patch adds escaping for text that would parse as magic words.
  In addition, it also adds checks to not trip on magic-word-like
  syntax which fixes the RT problems on en:Duke_of_Aveiro

* Added new parser tests for this behavior.

* Cleaned up debugging/tracing for wikitext escaping.
* Added tracing of wikitext escaping logic (--trace wt-escape)
* Added tracing to spit out tokenizer tokens only (--trace peg-tokens)

* Most RT failures on en:Duke_of_Aveiro are now fixed -- the remaining
  issue will be investigated in a new patch since it doesn't seem
  related to behavior switch handling.

Change-Id: Icef5d313f380261502da7fcbddc4e48c304b64d9
Merge "Tweaks to tokenizing and bug fixes for escaping of behavior switches"