Centralizing name/rank/etc stuff used in messages for #442

There were computations of name/rank/etc all over
the place.  The goal of this is to put it in fewer
places and call from there.

(n.b. I'm not too familiar with the JS object model yet,
this might could use some further refinement.)