Stage 2: Add write() support on cached sparse pages

This only works on filesystems that don't define their own ->write_begin()
and ->write_end() members, which ext4 does. Only tested on ext2.
Stage 3: Support truncation/invalidation of dedup pages

This *should* work with any filesystem, AFAICS.

It includes an unfortunate kludge of adding an array of page indices
to struct pvec. The array is only populated if the page is a dedup
page and the caller requests it, but the space is unconditionally
allocated, which is obviously bad. A LIST would probably be more
appropriate, so that the overhead in the normal case is a single
additional pointer in the struct.