Add stacktrace to ParseError

Fixes #854. Also clean up the parse error test a little, while adding a .stack check.
That's a good point, there's no check for that `error` existing. However, rather than move it all into the catch block, I think it's better to leave things as is and add another check to see that `error` exists before the others. Since we are verifying the properties of `ParseError`, the fact that a `ParseError` is thrown is an implicit condition of our test, so it would be better to message that more explicitly if we can (i.e., `error was not thrown` rather than `TypeError: Cannot read property 'name' of undefined`).

As long as we have an existence check it doesn't really matter where the other checks are, in the if clause of the existence check or in the catch clause. However if possible I think it's usually better to put test assertions closer to the end.