extract duplicate code from arc_buf_data_free and arc_buf_l2_cdata_free

Suggested by: mahrens
clear b_tmp_cdata if does not point to a buffer with compressed data

Suggested by:	mahrens
make l2arc_release_cdata_buf more universal

Possibly L2ARC could use other compression algorithms in addition
to ZIO_COMPRESS_LZ4.