Adding support for `lifecycle` and `create_before_destroy`

This PR adds a new `lifecycle` block to a resource. This is used to customize the lifecycle handling of Terraform. This adds a single option initially `create_before_destroy` which allows a replacement resource to be provisioned before destroying the existing instance.