Add stacktrace to ParseError

Fixes #854. Also clean up the parse error test a little, while adding a .stack check.
Now that you mention it, no, we don't have reliable testing environment since the test are being run in browsers as well. It'll fail in IE < 10.