HREF exploit fixes and other research stuff

Fixes HREF exploits related to research equipment and vending machines: #2665 fixed
Moved around checks and procs so they make more sense
Fixed potential circuit imprinter runtime caused by dividing by efficiency_coeff which can be 0
Missing materials in the build/imprint interface will be highlighted