Support custom serialization for Session::CookieStore

This change provides the ability to specify a custom serializer for the CookieStore. In order to use serializers which only support base types, the FlashHash object has to support (de)serialization to/from plain Ruby hashes. FlashHash changes were made by porting over the Rails 2 portions of [Envato's Rails 4 flash backport](https://github.com/envato/rails_4_session_flash_backport), h/t @charliesome .

/cc @josh @mastahyeti @ptoomey3 @dbussink