Bug #3963: Various incorrect flag handling changes

The patch corrects various incorrect flag handling specifically,
!expression & constant

should be changed to

!(expression & constant)

Following Coccinelle script was used to detect the problem

@@
expression E;
constant C;
@@
- !E & C
+ !(E & C)

To know more about Coccinelle please visit http://coccinelle.lip6.fr/

Reviewed-by: Marcel Telka <marcel.telka@nexenta.com>
Signed-off-by: Prasad Joshi <pjoshi@stec-inc.com>
Merge branch 'Bug_3963' of github.com:prasad-joshi/illumos-gate into Bug_3963