standardize ID serialization

From #1285:
> What do we do with the `name` fields? Can we just fill in `id` across the board, or should we fill in the name where possible? (as I've kind of done here)
Well, it's not a raft algorithm concept per se, but it is a useful type to have in the library that implements the algorithm. I'm worried about this casting and where we might get lazy in the future, but maybe that's not warranted.