ehm... when you reinstall you just need to copy the whole firefox profile... and all sessions, cookies, history, passwords, form datas, extensions, configs and everything is kept intact -_-
I suggest you to use keepass safe to generate and store securely random passwords.....
http://keepass.info/
Bookmarks