SyncDbSpec : add test for all query
change replicate behaviour : sync only last versions elements
fix Sync tests according to the new behavior of replicate : query only last versions
sync : fix conflict test
Lock : clean code
add Listeners feature