The changes I made.

Since I have gotten no response on the forum about the changes I made in your absence in the last couple weeks I'm making this.  Have fun figuring it all out.  Here's a summary.
I made item factory and service manager as global static objects to reduce the passing and storing of values.  (speed and memory improvement)
I replace the module attribute system with one that works generically and allows most module effects to take effect without custom code for each module.  It also acts on Items rather than ships so the modifiers can be applied to anything, NPCs, other modules, etc...
Speed up of item factory shutdown especially when large numbers of items had been loaded.
Removed the last remnants of the mostly unused old attribute system.
Other thing you'll have to look through the commits to see.