After searching in Google I found two solutions: one consisted in create a new profile and transfer the mail data from the problematic profile to the new one.This solution required too much effort for my liking. The second solution that everybody said would not fail was running the following command:
"C:\path to thunderbird\thunderbird.exe" -chrome chrome://pippki/content/resetpassword.xul
Unfortunately for me this command never worked no matter what I did and as this forum thread shows I am not alone so I assume is a Thunderbird problem and not mine. I even tested the command in two different machines one with a clean Windows installation and I can assure this command does not work!.
So a little more research showed me that the passwords are stored in a file called key3.db that resides inside the mail profile folder. If you don't know where is your profile folder check this link.
So I simply closed Thunderbird and renamed the "key3.db" file to "key3.db.bak" and started Thunderbird. And that was it... all passwords were gone but also the annoying master password was gone too.
If you need to reset your master password for any reason and you do not care loosing the already stored passwords (web account passwords) then this is the simplest method to do it.