data: Fixed the bson and json struct takes for RangedComparer
data: Added comments.
data: Implemented the RangedComparer.Compare method

Also added tests.
data: Updated RangedComparer, and tests.