ReplicatedPG: clean up num_dirty adjustments

Previously, a _delete_head() followed by a recreation on an object in
the same transaction would result in num_dirty being decremented in
_delete_head() without the flag being cleared.  make_writeable() would
then see exists and was_dirty and therefore not increment num_dirty
resulting in a mismatch.  Rather than trying to maintain the num_dirty
number in _delete_head(), rollback_to(), and make_writeable(), it seems
simpler to do the adjustment once in make_writeable based on undirty,
ctx->obc->obs.oi, and ctx->new_obs->oi.

Fixes: 7393
Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge pull request #1391 from ceph/wip-7393

ReplicatedPG: clean up num_dirty adjustments

Reviewed-by: Sage Weil <sage@inktank.com>