xfs: split out iclog writing from xfs_trans_commit()