pub fn encode_key(entity_id: u64, space_id: u32, timestamp: i64) -> [u8; 20]
Encode a key as 20 big-endian bytes with sign-bit flip on timestamp.