code: Provide functions for different byte orders

Rationale: see #1586.
Add UBJSON library