diff, merge and patch sets, dictionaries and lists in javascript