Only rexecute do_tag if filter is not empty

Problem:
Enter a search query that does not return any threads. Then trigger
search_tag, e.g. by pressing "a" to archive the current thread.
thread_id is now not available, the filter is empty. In tha case
db.query() will match all messages in the database. As a result all
massages get tagged with the passed tags (in case of 'a' all messages
will get archived - tagged as "-unread -inbox")

Solution:
Only run the body of do_tag if filter is not empty.