Fix SOAP warnings
Fix readline warnings
Remove old zend_string_to_double function
Drop some unsafe-looking casting code from ext/socket

ZVAL_COPY before convert_to_string is probably not right.
Fix overflow check for string concatenation

Also do the overflow check for both branches, not just the realloc
one.

And clean up the code a bit - move common parts outside of the
realloc/alloc branches.