Adds synchronization to attach volume.

This patch adds the following changes:
1. Move db update for volume status during attach to volume.manager
2. Add lock synchronization to volume attach operation
3. Related unit tests

Fixes Bug 1087253
Change-Id: I15242766bf4cfa4da67789c485fdf6886983eb45
use deleted = False, not 0 for update

Fixes bug #1095401

When running tempest on cinder on postgresql we get a number
of errors because this call was trying to set deleted = 0.
On mysql 0 == False, but on postgresql this is a type error.

Change-Id: Ice85550e8138e0656c93a8a800afdbc5935e4bcc
Merge "Adds synchronization to attach volume."