Clone Error instances to preserve instances of subclasses of Error

If we're dealing with an instance of a subclass of Error, we can't just make a
new Error, otherwise we lose that class information. Instead, we can clone the
original instance.
`Object.defineProperty` returns the resulting object, so this is accumulating an object by adding one property at a time. I actually just saw that `Object.defineProperties` can do multiple at once, so I'm gonna swap that in.