Only emit OpNumberEnd events if the next byte is legal
Add a few more scanner test cases
Minor tidying
Drop primitive parsing support