add TTL encoding, with test. now requires Data::Types for validation.