Doxygen: Rewrite mwdoc-filter to fix bug with slashes in comments
The behaviour stays the same (extract type from @var comment and
insert into source code between e.g. "protected" and "$name") but
implemented using PHP's tokenizer instead of global regexes.
This fixes the problem with slashes being found inside the
documentation comment and various other edge cases, such as use
of slashes inside comments.
Also fix the problem with PHP namespaces being misinterpreted
as a Doxygen /command by escaping slashes automatically. This
shouldn't conflict with actual commands, since we use '@' for
all commands (e.g. @param, @return, @since etc.)
Change-Id: Ic03a8fc9d4b4851f66c2e975d9955ba20ab92f0e