Introduced the securityPolicy member of the Yesod typeclass, added tests...

..., and updated documentation and scaffolding
The scaffolding changes should go against the yesod-scaffold repo's postgres branch, so that they're included in future releases.