This is a POC whose primary goal was to have column values return DatabaseValueConvertible
We missed several non-convertible fields with just the threads class, we'll
miss others while developing the mgiration and in the future when adding
properties.
DatabaseValueConvertible is Swift only, but our SDSSerializable protocol was objc.
Though we weren't using the SDSSerializable methods in objc, we were taking
advantage of the fact that methods defined in @objc extensions can override
other methods defined in extensions on their superclass.
e.g. TSGroupThread can override `columnValues` and call super.columnValues even
though both are defined in extensions, because they are @objc extensions
This isn't allowed in Swift, because it's not safe (overrideing in an extension
can clobber another extension's method). There's an old proposal about adding a
limited safe form of the functionality to the language:
https://github.com/jrose-apple/swift-evolution/blob/overridable-members-in-extensions/proposals/nnnn-overridable-members-in-extensions.md
I'm not actually super concerned about the "unsafeness" of the extensions
approach in terms of clobbering methods, but because I want to leverage
Swift's DatabaseValueConvertible, we'd be forced to address it.
In this commit I kind of shuffle things around so that most of the SDS
serializing functionality is _not_ defined in an extension, but rather in a
parallel class hierarchy of Serializers.
SDSSerializable then becomes a very small protocol whose only responsibility is
to provide an instance of SDSSerializer.