Reworked simulation of weapon overheating

Reworked simulation of weapon overheating as described in #1007.

AFAIK this is completely functional, but details will be improved over the next couple of days (jam chances per weapons, adjusting thresholds for visual effects, etc).