[advancedqueryparser] Fixes to avoid out-of-bound access if last character is a comparator
To trigger the bug which has solved with this commit: very last character has to be one of '<', '>', ':', '=' only triggers in Debug builds (i.e. with Q_ASSERT) it is not a out-of-bound access memory-wise, as QString::at(size()) points to the trailing \0