common: add helper to count number of exclusive extents in a file
Add a new helper that is similar to _count_extents() except that
extents that are shared several times by the file with itself
(reflinked at different file offsets) are accounted 1 time only,
instead of N times.
This is motivated by a subsequent test for btrfs that will use this
new helper, to verify that send streams are issuing reflink
operations.