Combine config reader and writer into a single class

Without this change, it is nearly impossible to extend both the reader and writer. I have no idea what the author was thinking (teehee) because this class is definitely cannot be extended as written.

It also allows for using something other than `serialize` for encoding and decoding config values by exposing protected `_encode` and `_decode` methods that can be modified by extensions.