reiser4: txnmgr: call reiser4_post_write_back_hook() also for empty atoms.

The atoms generated by reiser4_trim_fs(), despite being empty (zero
capture_count), still have non-empty delete sets which have to be
processed.

Also the empty atom check has been moved after changing atom stage
to ASTAGE_PRE_COMMIT, because reiser4_post_write_back_hook() requires
atom to be unlocked.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: batch discard support: add a dummy FITRIM ioctl handler for directories.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: batch discard support: actually implement the FITRIM ioctl handler.

It works in an iterative way, grabbing some fixed amount of space and allocating
blocks until grabbed space is exhausted or partition's end is reached.

Blocks are scheduled for discard by allocating them and immediately adding them
to the atom's delete set, which is read and processed at atom commit time.

After reaching the allocation stop condition, the atom is force-committed and,
if the allocation has been stopped due to grabbed space exhaustion (not due to
reaching end of partition), another iteration happens.

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