[perl #121505] include -fwrapv by default for GCC 4.3 and later
Implement "max waste" thresholds to avoid problems with COW and deliberately overallocated pvs

COW does not play nicely with "preallocate" algorithms.

More specifically code like sv_gets() wants to preallocate a large
buffer into $_ for performance reasons.

Prior to COW this was just fine. When someone assigned $_ to a
less volatile variable only the used portion of the buffer was copied,
and the extended buffer would be reused by sv_gets() and all was well.

With COW however this process is foiled. The preallocated buffer
get shared, and then when $_ is updated the buffer is dropped from $_,
leaving the other SV holding ownership of the overallocated buffer,
and causing sv_gets() to allocate a new buffer entirely. This process
would then repeat consuming time and lots of memory.

This patch introduces a "wastage" check to COW. When decided if we
should COW a string we look at the ratio and difference of SvCUR(sv)
and SvLEN(sv), which represent the "actual string length" and the
"allocated string length". When the difference exceeds a hard threshold,
or when the ration exceeds a designated factor then we do not COW.

This means that strings with large overallocations are not COWed.
Exactly how this works out in practice, where SvGROW() *always*
overallocates, is an open question.

See: https://rt.perl.org/Ticket/Display.html?id=121796

This patch also slightly tweaks SvGROW() not to do roundup on the first
allocation of the pv. Odds are good that the initial request realy does
want exactly what they expected. (SvGROW contrary to what the name
suggests is used for bother *extended* the size of a pv, and
initializing it the first time.)
document sv_gets() internals

sv_gets() contains some very dense code. while trying to rewrite I
learned a lot about it worked, and Nicholas asked me to update
the comments. So here they are. Hope this saves someone some heartache
trying to understand this code.
sv.c: fix closing comment

replace /* with */

it didn't matter because it was immediately followed by another comment
incorporate perl5190delta into perl5200delta
incorporate perl5191delta into perl5200delta
incorporate perl5192delta into perl5200delta
incorporate perl5193delta into perl5200delta
incorporate perl5194delta into perl5200delta
incorporate perl5195delta into perl5200delta
incorporate perl5196delta into perl5200delta
incorporate perl5197delta into perl5200delta
incorporate perl5198delta into perl5200delta
incorporate perl5199delta into perl5200delta
incorporate perl51910delta into perl5200delta
reorder "core enhancements" section
reorder "incompatible changes" section
first pass editing up through "Configuration and Compilation"
perldelta: edit up through but not including Selected Bug Fixes
incorporate perl51911delta into perl5200delta