reiser4: block_alloc: split block allocation accounting logic into separate functions for re-use.

This logic is also needed for the "exact" block allocation function which will
be added in the next commit.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: block_alloc, plugin/space/bitmap: add a method for "exact" block allocation.

This allows to allocate exact count of blocks at exact position.
In particular, 'precise discard' implementation will need this interface
to perform padding of the discard extents.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: iterate over extents in discard_atom

. add discard_sorted_merged_extents();
. add mount options to specify erase unit and alignment;
. verify and set discard params to the super-block at mount time;
reiser4: blocknrlist: add operations blocknr_list_del() and blocknr_list_update_extent().

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: discard: allocate extent paddings.

Subsequent deallocation of newly allocated padding blocks is ensured by
writing the actual discarded extents back to the discard set.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: discard: fix gluing extents in discard_sorted_merged_extents().

Extent length (@alen) should be updated together with @end, i. e. unconditionally,
and not only if we need to regenerate the tail padding.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>