improved implementation of head() for SqliteMailbox