Fix comparison of remote and cached directories in sync (fixes #550)

In sync.js, allDifferentKeys must now be able to handle objects as values due to the new directory listing format.

I don't know how to test this properly, as the function is not available from the test suite. Any ideas? In any case, we should merge this asap, because it means that after every dir revision update (so basically after every PUT and DELETE) all objects in a directory are synced again.