Findbugs performance fix: using entrySet instead of keySet

I turned on FindBugs to fail the build on errors, and as a result fixed those errors.  There is only one error category that needed fixing; performance and mostly just one thing:

> <strong>Inefficient use of keySet iterator instead of entrySet iterator</strong>
> This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

I will next attempt to look through other categories we might be interested in, such as CORRECTNESS, MT_CORRECTNESS, BAD_PRACTICE and STYLE but we likely have to weed through those to find the ones actually we care about. It is however good to point out that as far as findbugs is concerned, no security issues are currently found. 

You can manually run findbugs via `mvn findbugs:check`. All PRs should do so automatically. 
minor but it would be nice to flip these variables (since normally key is used/referenced first)