Don't mutate `sanitize` config

Since `Hash#dup` in ruby is shallow and the `sanitize` config is nested, duplicating it
isn't enough to mean that changes to the duplicate are side-effect-free. This change changes the
duplication to a deep-duplication.

The Marshall load/dump pattern is the simplest implementation of deep dup in pure ruby that I've seen.