Improve performance of stacktrace generation

Generating a new Throwable() is a quicker way of getting the current
stacktrace than examining by thread. Some benchmarks are posted on this
StackOverflow answer: http://stackoverflow.com/a/10625065/14302