Improve stack comparisons to make tests succeed.
Improve stack comparisons to make tests succeed.

The stack traces created by the go-errors package and debug.Stack() are no
longer equal and cannot be used in tests. Instead we now compare the actual
program counter values in the stack trace with reference stack traces created
in the tests. This will work even if the formatting of stack traces change.

go-errors/errors