Fix dirty flag setting

SEGFAULT fix - m_dirty flag (align with Java target)
REWRITE_EARLY_EXCEPTION aka RewriteEarlyExitException
Debug print
SQL AST start
SQL AST
SQL AST
SQL AST
next node partial fix
nextNode nextTree fixes (but still has a leak)
AST creation
rewrites having predicates
AST generation
s004 start rule
AST generation
AST generation
AST generation - SEGFAULT fix
AST generation - standard_function fixes
Segfault fix

Explanation:
For code(using labels e1, e2) like this:

sample_clause
    :    sample_key block_key?
        LEFT_PAREN e1=expression (COMMA e2=expression)? RIGHT_PAREN
        seed_part?
        -> ^(sample_key block_key? ^(EXPR $e1) ^(EXPR $e2)? seed_part?)
    ;

ANTLR generates code like this:
	e1=expression();
	...
	if ( this->get_backtracking()==0 ) stream_expression.add(e1.tree);
	...
	...
        // AST REWRITE
        // elements: e1, e2, block_key, sample_key, seed_part
        // token labels:
        // rule labels: retval, e1, e2
        // token list labels:
        // rule list labels:
        // wildcard labels:
        if ( this->get_backtracking()==0 ) {
            retval.tree = std::move(root_0);
            RewriteRuleSubtreeStream<ImplTraits> stream_retval(get_psrstate()->get_treeAdaptor(), "rule retval",retval.tree); // retval
            RewriteRuleSubtreeStream<ImplTraits> stream_e1(get_psrstate()->get_treeAdaptor(), "rule e1",e1.tree); // rewrite alias
            RewriteRuleSubtreeStream<ImplTraits> stream_e2(get_psrstate()->get_treeAdaptor(), "rule e2",e2.tree); // rewrite alias
	...

The variable e1 of type expression_return is assigned into two different SubTreeStreams.
Since destructive copying is used(unique_ptr) the second assignment inserts NULL ptr into stream_e1.

This fix changes the behaviour. RewriteRuleSubtreeStream no mode holds instances of unique_ptr but instances of reference_wrapper<TreeTypePtr>
Performance improvement - do not alloc new instances of std::string in CommonToken::getText()
AST generation fixes (model)