[perl #118175] avoid overflowing a pointer for repeated EXACT nodes
[perl #118175] prevent a similar overflow for POSIXA
[perl #118175] prevent a similar overflow for CANY
[perl #118175] avoid making a pointer outside a string

Simply adding scan + max causes undefined behaviour per ANSI C if the
result points outside of the object scan points at.
[perl #118175] avoid making pointers outside of objects

In a couple of cases, when strings were allocated above the 2GB line
on 32-bit CPUs, this could cause regexps to act strangely - not matching
or crashing perl.

The final patch in the set prevents pointer creation which the C standard
describes as undefined behaviour, but is typically safe (as long as the
pointer isn't derefed)