Metrics: Add simple helpers to encode/decode timestamps to []byte.