Document close like other functions.
add in a quit command
Improve stats command (be careful with closures inside loops!).

* Cleaner to understand closure.
* Functions correctly with multiple servers.
* Error callback correctly invoked.
Improve flush implementation.
Fix spelling mistake in source notes.