Cleanup: move simple byte manipulation util methods in ByteUtil (nothing bdb-specific)