Set state to deleted when deleting

In some cases (e.g. when all servers are deleted), a machine may be
deleted even if the current db state is not DELETE (or ERROR).
In all cases, if the db state is not DELETE when a machine is
deleted, set it to DELETE, so that it will be removed from the
db during the next pass.

Change-Id: Icd6a6eb6e6896f88e06ff0c8e9d53b6b34092ad8
Merge "Set state to deleted when deleting"