Error.captureStackTrace now gives .stack to non-error objects

This fixes #473 and adds regression tests.