Generalise the idea of saving some unused key/value pairs

Grouping will also require this, and it makes the code slightly clearer
to have a distinct step for saving the value.


git-svn-id: http://www.latex-project.org/svnroot/experimental/trunk@4550 de43f980-851b-0410-b2f7-c40aca1f87e0