Add CloudFormation template capabilities support.

Adds support for Capabilities and CapabilitiesReason to the Template
object. Fixes #2075.

@toastdriven, please review.