I have been working towards trying to make my extension Toolbar Buttons restartless. One of the trick parts is need to create all the buttons by script. Fortunally There is CustomizableUI modules that handels all this really nicely in Firefox 29+. Unformtally, it only exists in Firefox 29+, and not in Thunderbird for example.
So what I have tried to do is impliment a module that has as close interface as possible to CustomizableUI, that works as a wrapper on top how toolbars function in Thunderbird. Really, it is just stuff you would have to write anyway to get a restartless extension adding buttons to Thunerbird, the only difference with this is that I am using almost the same interface. Once (if) CustomizableUI is added, there would be no need to change other code much.
The only difference in the interface is becuase Thunderbird can have 2 (or 3 if you have Lightening installed) toolbox's in the main window and there is a need to sellect what one you want to use. You can see the code below. Feedbox or comments welcome.