Thunderbird and Firefox both use the same internal rendering engine (Gecko) and several shared components (Toolkit). In a source checkout, all the code in comm/ is specific to Thunderbird (/ SeaMonkey), and all the code in browser/ is specific to Firefox, and almost everything else is shared betwixt the two.
afaic it does, yes. They try to decouple it, though.