Requiring contiguous buffers removes the need to use mxs::Buffer which
also removes the need to check for buffer boundaries.
Converted all the functions used by get_canonical into `static inline` so
that the compiler knows it can inline them. A few of them weren't `static`
which made the calls to the functions unnecessarily expensive.