examples: Fix samples

Fix #11 

* Replace `protocol.close_client()` by `protocol.close()` and
`protocol.wait_closed()`.
* Remove sleeps