Considering google scans incoming attachments on Gmail for threats, it's just Avast trying to make itself known and make you think it's doing something useful.
If Gmail is your only email account you're using with Thunderbird, then just disable the email scanning. You should be manually scanning attachments before opening them anyway.