locations bugfixes in parse_dammit

This looks like a lot of commits. I'm not sure how to push only some commits. But I had added my own file that I was using for a different project that did code rewriting. In the end, I decided to transfer that file to the other project's repo. So a lot of those commits won't affect acorn at all. The only affected file is acorn_loose.js.