Refactors cooldown system to be entitysystem.
Removes uneeded synchronized block.
Implements second version of check cooldown function.
Fixes a bug in unit test.