add support for $self
moved from $self to $parser

- also adjusted generated tests for the above
- also adjusted generated tests for recent changes in Python/JavaScript
targets (token types are nos class members like Java/C#)
Merge pull request #770 from antlr/add-$parser-support

Add $parser support