Description
In the N1QL parser, we don't actually check if the chunk was the last when transitioning to the DONE state. This leads to blocking when there's still a little chunk with closing bracket(s) at the end.
The parser should only be reset when in DONE state AND the chunk is the last.