Don't mangle the options object in res.cookie

Make a copy of the cookie options before mutating it to pass to
cookie.serialize. This prevents unexpected things from happening when
we try to use the same options object multiple times.

Also add a test to verify that the options object does not change
after a request is made.
Merge pull request #1458 from gmethvin/cookie_options

Don't mangle the options object in res.cookie