add currently failing test and one to verify currently correct behaviour
introduce depth tracking
change bad_foo_bar test to pass
avoid error being emitted twice
Merge pull request #20 from jimhigson/errorcases

Track depth to throw error if parsing is closed before all JSON objects are complete. Fixes issue #18.