Implement strict validation for the packing/unpacking of the data.
Refactor the datatype engine to reduce the critical path for the most
trivial (and thus used) datatype usages. Make the gaps_contiguous
pack and unpack functions similar.