Issue 27 integrate testing framework

extracted almost all the code of rbkit client into a lib, which can be reused in writing tests. at present there are no tests. will write tests as part of separate PR.
feel free to defer this PR untill tests are implemented.