Revert "Rewritten module Xs_handle to be more functional style, with better interface and documentation"

Unfortunately we were relying on the mutable data within the 'handle'
record to track the paths accessed as a side-effect of RPCs. These
accessed paths are needed to decide which paths to watches.

This reverts commit d175021529a91fc69bcb3bb105d74a3727103bf5.
Merge pull request #12 from djs55/fix-watch

Revert "Rewritten module Xs_handle to be more functional style, with bet...