Cleaned up ownership of rules within grammars

Now, when adding rules to a grammar, you relinquish control of it, and
as such are not allowed to manipulate it after the fact. If you do need
to manipulate it, get a reference to the internal version by calling
getRuleByName on the recognitiongrammar.