Handles removing (unlink()) uploaded files that are left at tmp_name.
The shutdown hook is registered in Setup.php if $_FILES is not empty. Users are expected to use move_uploaded_file() to place wanted files in proper location.
If changes are made to the $_FILES array the shutdown hook will have an unmodified copy which both prevents tampering and allows empty files to be removed along with others after removeEmptyFiles() cleans the array.
GCS creates empty files when a POST request is sent with empty file fields. Typically PHP would ignore the file fields signified using UPLOAD_ERR_NO_FILE in the $_FILES array entry. Instead rfc1867.c is modified to pass the entries along with UNLINK as the file name to ensure the tmp_name is filled with gs:// address and can be unlinked along with any unprocessed uploads.