btrfs: qgroup: Refactor btrfs_qgroup_insert_dirty_extent()