Ensure no information escape happens when using Params#to_h. Added tests for #to_hash.