Add upstream r1684653 from bug #7208, which fixes warnings stemming from
calling each/keys on a hashref.
While here, convert @unexec stuff into preunexec and postunexec.
Submitted by: Larry Rosenman
Obtained from: https://svn.apache.org/viewvc?view=revision&revision=1684653