FoundationDB/sql-layer — pull request #1119 by MMcM (2013-12-19 20:45:29+00:00)
Title:  Add *exactly* compatible size computations via TInstance.

Since we have no motivation for changing RowData, the idea is to answer the existing size-related questions on ```Column``` the same way so that the same layout is chosen. Later, when we move to Protobuf row format or something like it, there is no need for these methods at all.

Some specific notes:
* I fixed BINARY to be like VARBINARY in Types rather than emulating its behavior because it was just broken. BINARY means always use the size of the type param, not always the max size of that type.
* DATE and TIME are stored as 3-byte integers, whereas the "serialization size" of the TClasses is naturally 4.
* UNSIGNED stores in the same size as signed, whereas again the "serialization size" assumes an encoding where sign extension needs to be avoided.

Note also that if we changed the non-instance sizes of these TClasses, then the estimated row width would change and all the costs in unit tests would change. Which just seems like noise. At some point, when we are prepared to rerun costing, we can reconcile these models, though I doubt MCOMPAT will be the default then.

For testing, I did ```mvn verify -Dfdbsql.test.extraJvmArgs=-Dfdbsql.aisbuilder.check.type=true```. I am open to suggestions for more, but the real test comes when it plugs in place of the current Types-based and all the system tests continue to work.