Export messages from message store for a time range

This will use the new indexes from #864 and will ignore any messages stored in an older version.
Type it into a Python interpreter. ;-)

We use `$` as the separator between the batch_id and timestamp in the index, so our default boundaries use the characters before and after `$` to make sure we catch all possible values.