Minor changes to reduce allocation.

- Cache a predicate in ActorMap.
- Use short circuiting to skip a call to HasTrait in AttackBase.
- In AutoTarget.ScanForTarget, move the check for the scan time above the calculations since we can skip them if it's not time yet.
- In AutoTarget.ChooseTarget, merge four Where calls into one.
Merge pull request #5615 from RoosterDragon/minor-alloc

Minor allocation tweaks