Implemented log buffering.

Added appengine.flushLogs API.
We empty the buffer and not rolling it back if the flushing operation is not successful.