Implemented log buffering.

Added appengine.flushLogs API.
We should document the behavior to make it clear callback is called after the message is pushed to a buffer or after flushing occurs.

The users who are willing to handle the callback will experience irregular latencies.