Make setting a property to the same value a No-Op.

When changing a property to the same value as it already has, the
database should not need to commit anything.
Since some users depend on being able to trigger the (legacy)
auto-indexes through setting a property to the same value (for auto-
indexes that were created after the property was first set) we need to
make sure that these events are still triggered, but the property change
itself should not trigger the writing of any data.

2.0 is the earliest version to which this change can be easily applied, 1.9 does not have a single clean cut place to change this behaviour in the same way as 2.x does. Implementing this for 1.9 would be possible, but would look very different.