Increase test coverage of swift/common/db.py

The most low hanging fruit is _preallocate(). As it turns out,
we never excercise the calculations because we never give it
a file that exists.

This version uses mock.patch everywhere.

Change-Id: I5df03aff295d2a1bca252a02b3985a6bc3eecb26
Fix handling of DELETE obj reqs with old timestamp

The DELETE object REST API was creating tombstone files with old
timestamps, potentially filling up the disk, as well as sending
container updates.

Here we now make DELETEs with a request timestamp return a 409 (HTTP
Conflict) if a data file exists with a newer timestamp, only creating
tombstones if they have a newer timestamp.

The key fix is to actually read the timestamp metadata from an
existing tombstone file (thanks to Pete Zaitcev for catching this),
and then only create tombstone files with newer timestamps.

We also prevent PUT and POST operations using old timestamps as well.

Change-Id: I631957029d17c6578bca5779367df5144ba01fc9
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Merge "Fix handling of DELETE obj reqs with old timestamp"