I've made a Thunderbird extension which adds wizard to setup Gmail IMAP account. After installing the extension, you can setup Gmail IMAP account from the File->New->Account menu. It creates new account and SMTP server settings. It also synchronizes draft, sent, and trash folders between Thunderbird and Gmail.
Please note that there are two limitations:
- You should use the same language setting in Thunderbird and Gmail
- Only English and Japanse are supported
You can download the extension from my homepage.