Fixed PHP-724: Stream context based logging framework

Initial support for "mongodb" stream context options
Valid context options are:
    log_insert => function($serverinfo, $newdocument, $insertoptions)
    log_query  => function($serverinfo, $query, $cursoroptions)
    log_update => function($serverinfo, $criteria, $newdoc, $insertoptions, $cursoroptions)
    log_delete => function($serverinfo, $criteria, $insertoptions, $cursoroptions)
    log_getmore => function($serverinfo, $cursorinfo)
    log_killcursor => function($serverinfo, $cursorid)
    log_batchinsert => function($serverinfo, $documents, $flags, $insertoptions)

Note that some things (like $query) may have been modified between the
time the user called the function and the time we emit the callback.
This is because we do rewrite for example the query to support mongos
Swap options and flags params for consistency
namespace the log_stream_*() functions and improve errormsg
Merged pull request #349