better automatic message expiration logic

now both the individual messages and the sorted set of message ids are
automatically expiring after the given time, with no need to run
background jobs doing the cleanup.