Set the rack cookie secret based on the secret_key_base.

I'm pretty sure this is the solution to #8789, but am open to any suggestion for improvement/rework.  This is my first useful PR to rails, but I think I've followed the guidelines (at least as best as I can tell).  Let me know if there's something I missed, and I'll happily go and do it!