Make reference set state into a boolean instead of a count
Fold referenced flag into forEachEntry
Add touch count to EncodingContext and make HeaderDecoder use it
add touchCount to EncodingContext.forEachEntry()
Make HeaderEncoder use the touch count