Session Manager saves and restores the state of all or some windows - either when you want it or automatically at startup, after crashes or periodically. It can also automatically save the state of open windows individually.
The add-on doesn't require a restart and can be enabled and disabled on the fly.
Version History for Session Manager for Firefox: http://sessionmanager.mozdev.org/history.html?oldversion=&newversion=0.8.1.7