fix signed and unsigned comparision in macros in public headers

gcc -Wsign-compare warns about expanded macros that were defined in
standard headers (before gcc 4.8) which can make builds fail that
use -Werror. changed macros: WIFSIGNALED, __CPU_op_S
add parens when bit and arith ops are mixed in macros in public headers

another commit to silence gcc warnings (-Wparentheses) for standard headers.
changed macros: LOG_UPTO, IN6_ARE_ADDR_EQUAL