This PR fixes how the grammar mask is index when generating text and adds a new test to ensure the grammars work with non flash models
This work in progress PR begins to add support for tools. Tools relies on grammar support and still has some unsolved challenges. Opening the PR for visibility and feedback