sync: use blob.Ref.Less instead of stringify to compare, fix API wart, more tests

Change-Id: Iffd98463becbcf6d62dd666b38fb00572b34725b