Add check for unhandled type
Fix size of encoded pages

This encodes pages on the wire using the actual buffer size rather than the
allocated buffer size (which is at least 64k even for an empty page).
Remove unused pages reading code
Simplify PagesSerde