run usercode before ending the request

Currently, the following happens at the end of a request:
onSendEnd -> run postsend functions -> hphp_context_exit

However, hphp_context_exit can call destructors for objects that are 
alive at the end of request. This usercode should be allowed to send
output. This causes a circular reference issue because postsend
functions might need to access those objects.

When we don't have a postsend function, preserve Zend compatibility by
delaying the execution of onSendEnd.