New readEvent and readPayload system

readEvent/readPayload now modify a passed array instead of returning
char by char.
Updated availableEvent/availablePayload, docs, and examples to reflect
the above.
Rewrite of availableEvent for performance improvement