The rewrite wasn't Firefox. The rewrite was Netscape 6. Firefox was streamlined version of Netscape 6 which hit 1.0 four years after Netscape 7. So from Netscape 4.0 to Firefox 1.0 was 7 years.
I think Joel's argument was that continual refactoring and improvement could have allowed one to evolve into the other in a much shorter time.
And I think that's a dubious proposition, because the advantage Firefox had over both Netscape and IE was simplicity and speed. Can you name a single software product that gets faster, smaller, and simpler over time? I can't think of any; in general, software seems to accrete features, and if it manages to lose them, it usually grows new features in their place. Netscape was replaced by IE, which was replaced by Firefox, which was replaced by Chrome, which is getting replaced by native mobile widgets. In each case, they needed to build off something that started off at an earlier point in their evolutionary line, throwing away all features that had been developed as the software met actual users. Mosaic begat Netscape, then Microsoft started back with the Mosaic code by licensing Spyglass, then Firefox went back to the rewritten Netscape 6 code, then KHTML begat Safari begat Chrome.
I think Joel's argument was that continual refactoring and improvement could have allowed one to evolve into the other in a much shorter time.