indexer: create background thread to index maildir

Used sqlite db to create index for mails.