fix emit() behavior to return false if an error occurred

fix testReconnectAfterBufferFull() test to flush at the end, rather then emit a new event and then flush.  this only affects the number of events checked at the end.