Don't set dirty flag if the preference value does not change so that we don't write out to the preferences file.
Don't set dirty flag for layer preferences also if not updating. Also return false if we don't really update.
Add two unit tests to verify that we're not updating the preferences if the value is the same.
Simplify the code to fix the issue of unable to delete falsy preference values that I introduced. Add one more unit test for removing falsy preference values and explicit checks for dirty flags in the previous two unit tests.
Merge pull request #7064 from adobe/rlim/panel-state-update

Don't set dirty flag if the preference value does not change.