Make SR.attach and SR.detach idempotent.

This is convenient because the SMAPI doesn't have any way to query
whether an SR is currently attached or not. The downside is that
we don't catch -- and don't know how to deal with -- the situation
where a client tries to attach the same SR twice with different
configurations.

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