Functorise the client module so it can be used with Lwt

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Fix jsonrpc so that it marshalls the reponse in json rather than xml

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Scripts to fix the broken commits in this repo

The result of this can be pushed to github and passes a "git fsck"
Merge pull request #960 from djs55/fix-broken-repo

Scripts to fix the broken commits in this repo
Merge pull request #958 from jonludlam/lwt-client-new

Lwt client new