Fixes swapping objects.

This resolves #30.

It needs tests, but I figured I'd open the PR to get the discussion going.

To test,

```js
// On master, you'll get an error
var patch = jsonpatch.compare({a: {}}, {a: null});

// On my branch, you get a diff:
patch === {
  op: "replace"
  path: "/a"
  value: true
};
```