Refactor the namecoind/NMControl management in the Firefox extension.

This cleans up some really really messy code, making it more reliable, maintainable, and user-friendly.  Anyone want to test this?