Remove _serialize() and _unserialize() methods

Since removing the unneeded manual escaping code, there is no-longer any reason
to have the serialization functions abstracted. This also allows us to only
suppress errors when unserializing cookie data, and only trim when we are
unserializing database data (see commit 6b8312).