Add in support for setting a process title.

RFC: https://wiki.php.net/rfc/cli_process_title
Discussion: http://marc.info/?t=136021582000003&r=1&w=2
Correct method signature in comments; fix return statement
Check malloc rc (hat-tip Christopher Jones)
Reset everything when memory alloc fails
Clean up allocated argv/environ if applicable. This will ensure clean
valgrind runs. (hat-tip to Christopher Jones for the idea)
Fixes for review comments by auroraeosrose
Merge remote-tracking branch 'upstream/pr/280' into msm_changes

This adds cli_set_process_title to the stuff I need for php-ftpfs.