Fix regression in Gmail-special-folder-handling.

This fixes a regression introduced in commit e9624a728, in which syncing Gmail
threads marked e.g. as starred or important would fail if the corresponding
folder was disabled from appearing in IMAP, or not present for some other
reason when we synced folder names.