new API: methods on Client and Server objects, instead of raw functions

rewrite README: add new API, add examples, remove low-level details