add error checking on number of captures
add error checking on overflow in allocation for MAYBE_STACK_ALLOC
Merge remote-tracking branch 'upstream/master' into re2-coverity-fix
Remove stray line
Merge pull request #457 from mppf/re2-coverity-fix

Try to fix Coverity errors with RE2 interface

Adds some basic parameter validation to RE2 interface routines taking in
nsubmatch/ncaptures since these must be ints for RE2 but are int64
in the interface.

Adds an overflow check to MAYBE_STACK_ALLOC so that we don't allocate
if count * sizeof(type) would overflow. This should hopefully correct
a Coverity error.