LU-941 hsm: Manage dirty flag for hsm-archived files

clio manages a LLIF_DATA_MODIFIED flag when file data are modified
which is sent to MDT. It now has a way to know file data was modified
and can update HS_DIRTY flag in LMA which is mandatory for Lustre/HSM
binding.
When HS_DIRTY is set, a changelog event is raised.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I074c8db0d6c10341aaabc55441fe746497259e84
Reviewed-on: http://review.whamcloud.com/1891
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2109 llog: introduce llog handle refcounter

llog handle is allocated by llog_open and freed by llog_close,
meawhile there is 'backdoor' to get already opened handle - it is
llog_cat_id2handle() function, it can find handle in the list. That
leads to possible use-after-free.

llog_refcount was introduced to solve this.
- llog_alloc_handle() set refcount to 1
- llog_handle_put() drops refcount and free handle if refcount == 0
- llog_cat_i2handle() takes extra reference
- llog_handle_put() must be called if handle was taken by
  llog_cat_id2handle()
- llog_free_handle() calls llog_handle_put() at the end.

Additional changes in patch:
- llog_cat_init_and_process() processes llogs without fork, making
  sure that server will not start until all old llogs are cancelled.
- llog_cat_cancel_records() doesn't break cycle if handle is not
  found but continue to check other handles
- wrong GOTO() parameter in llog_close. Should be 'rc = -EOPNOTSUPP'
  but not just '-EOPNOTSUPP'.
- indentation fixes.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I0dd0a934eb79c63c6726902540132ad877183d10
Reviewed-on: http://review.whamcloud.com/4745
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>