Changed bytesReceived to be updated before emitting events
Fixed setting of fd flags in dyad_setSocketNonBlocking()
Minor adjustments to doc/api.md