Functorised client supports RPC timeouts

Previously only the legacy Unix version supported timeouts.

Also: fix a resource leak in the Lwt client which was already fixed in
the Unix client (!)

Signed-off-by: David Scott <dave.scott@citrix.com>