Refactor TokenMatcher to separate processing of pre- and post- pretty printing

Add function filterDefines which may be used later.
Emit semicolon for SemicolonAtEndOfLine option

In a few active patterns, specific cases have to come before general
cases to avoid early matches.

This fixes #32.