add a ship total mass limit check in EquipType.Install

This prevents actions like scooping cargo from using more than the
available space and hence giving you negative free capacity.
fix some erroneous use of global variables in EquipSet