Fix begin_detach logic

Fix begin_detach logic so it checks that a volume is in-use AND
attached.

Change-Id: I6f0e584070a5fc02c55c26ea92cb8b0c2a2cda3e
Closes-Bug: #1337088
Merge "Fix begin_detach logic"