Workaround PHP compiler globals storing doc_comments

The PHP parser stores the last docblock comment it saw in a compiler global. When the compiler next sees something that might conceivably have a docblock comment, the thing becomes the owner of the comment, and the global is cleared.
Unfortunately the parser does not clear state between parses. A call to token_get_all() on something containing a docblock comment will cause the global to be set. The next file to be compiled by an include() will start off with that global, and this (under some circumstances) can cause the comment to be erroneously associated with another class.

This workaround ensures that after a call to token_get_all() we reset the parser to a state where the doc_comment compiler global contains an empty comment, and is therefore "safe" for us.

This is only a workaround: With this fix we have to hope that any other uses of token_get_all() in the user's codebase are also similarly protected. IMO this is a PHP bug (for which I shall raise a bug report), and should, long term, be fixed there.
Switch to require_once in testResetsPhpParserAfterUse to avoid fatals.

To make sure our test is valid we do, however, need to fail the test if someone has already managed to require the file.
Better check to make sure that testResetsPhpParserAfterUse() is valid.

(Ab)use a static to mark the test as run once it has been run first time.
If it's the first run and the test class is already defined then fail as the test's not valid.
Merge pull request #9 from JonathanO/fix-compiler-bad-state

Workaround PHP compiler globals storing doc_comments