MRP-690 ldlm: backport couple of changes after upstream landing

- actually do async lock cancelling in blocking threads if caller
  asked for that;
- cancel osc locks asyncronously as well;

cleanup

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I858ba82b7434909b8bcc60be43ea69feda289795
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/321
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Tested-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-961 kernel: warning at fs/inode.c:1291 generic_detach_inode

Following is the code path which results in the warning,
ldiskfs_mb_release -> iput() -> generic_detach_inode() call path.
...
int generic_detach_inode(struct inode *inode)
{
..
        WARN_ON(inode->i_state & I_NEW);
..
}
Thus the sbi->s_buddy_cache->i_state should be cleared before the call
to iput to overcome this WARN_ON message.

Signed-off-by: Parinay Kondekar <Parinay_Kondekar@xyratex.com>
Change-Id: I4991df44fe1dc39d6fb0c240b1d4e98fcc4aec9c
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>