regex: Fixed several warnings about signed/unsigned conversions.
regex: Fixed warnings about unused parameter values.

There are different solutions to the problem. In this change, we
define an UNUSED macro that maps to __attribute__((unused)) when
compiling with gcc. Otherwise it is a NOOP. We apply this macro
in all function headers for each parameter value that is not used
within the function body.

The change is local to regex.
Merge pull request #1224 from sba1/some-regex-warning-fixes

Some regex warning fixes