Remove setGStateForKey() closure.

setGStateForKey() is a closure that serves no particularly useful
purpose. This change inlines it at the single call site. This avoids 1.7
MiB of allocations (because closures are objects) for the MTA map
mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=835380#c17.
Merge pull request #5205 from nnethercote/setGState-closure

Remove setGStateForKey() closure.