Dupes: Working implementations of Level and Mem backed dupe stores

* Add test to dupes store contract
* Hide leveldb specific serialization inside LevelDB store
* Use Data.Set in dupes bucket as ordering does not matter
* Re-write part of the leveldb store to use new signatures