counter_cache should inc atomically, and also change the document in memory

[fixes #3278]
update changelog