Add a sanitizeError option and specs

:warning: First pass at this idea. Happy to have a discussion about it. Also, the readme should be updated, but I didn't want to put that effort in until the approach has been approved.

Error objects often contain information, such as the stack, that should not be exposed to the client.

This adds the ability to give a `sanitizeError` function to the Connection that will be called whenever an Error is encoded. The return value of this function is used in place of the original error.