make comments not confuse the c++ parser
comments can appear pretty much everywhere. consequently, handling them
as proper tokens is rather tedious (and was of course not done
consistently, leading to numerous bugs).
so take them out of the token stream and handle magic comments "in the
background".
this necessitates that we use match() a bit more sparingly, as we must
not call getToken() after a "tr()-terminating" token too early, as it
might erroneously collect subsequent magic comments too early otherwise.
Task-number: QTBUG-21876
Change-Id: I3d2168f019dfc06b0778142bcd5eb619b61e6b2d
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>