AthenaKernel: Fix coverity warnings.
- Use move instead of copy (CID 11126)
- Avoid spurious copies in range-for (CID 13059, 13309)
- Remove useless comparisons (CID 10551)
- Explicitly ignore return values (CID 10234)
- Fix integer overflow that was potentially resulting in some useless work in a unit test (CID 13478)