Remove some code duplication inside of grammar-spec

Create an @reloadGrammar function which can be called to remove the
cached grammar module and require it again.