Upgrade sanitize gem

Since the gem hadn't been touched in a while, it was also necessary to update the Rakefile to get rid of a deprecation error that prevented rake from running.

While updating the API for the Sanitize gem was fairly straightforward, knowing which spec expectations I could change without changing the intent of the tests caused me some trouble, so if some extra review could be done around that section of the diff, it would be much appreciated.