Make DeletionPolicy a resource attribute instead of a property.

This improves validation of the different values, and make the Retain
policy works for all resources.

Fixes: bug #1160779
Change-Id: Idb0d275c44661db341f693d9d80629661d66c7ac