Get rid of toHashObject from ranges/selection

toJSON is supposed to return an object, which is converted to a
string in JSON.stringify, so the getHashObject step is unnecessary.

Change-Id: I5d1f32eedfbcc5f8079eee890e76047bc85b1de3
Merge "Get rid of toHashObject from ranges/selection"