Deactivate (and dequeue) proposal when deleting it

If a proposal is being deleted, it needs to be deactivated first (in
case it was active) and dequeued (in case it was queued). Otherwise, the
role will still exist, and this will break later proposals that have the
same name.

Note that while the webui guides the user to avoid this bug, it's easy
to trigger the bug from command line:
  crowbar <barclamp> proposal delete <proposal>
Fix destroy_active to not use role name as intance name

The current code will call apply_role() with a role name instead of an
instance name because of this...
Merge pull request #537 from vuntz/fix-delete

Deactivate (and dequeue) proposal when deleting it