Change storage format of buckets

Buckets are now a series of keys followed by a series of values, rather
than a series of key-value pairs.