Incremental commit: make a single 'write' function

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: make watch registration idempotent

This will simplify the side-effect handling code.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: unwatch should be idempotent

This makes handling the side-effects easier.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
server: connecting to an interdomain ring should be idempotent

This simplifies the side-effect tracking logic

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