a better workaround for ccache warnings
use ARRAY_SIZE where possible
minor refactors to avoid cppcheck warnings

In all of these cases, cppcheck's warning was a false positive and
nothing bad was happening, but these seem like reasonable
refactors to avoid the warnings regardless.
update NEWS