Conditional support for persistent2 branch.

Pinging @gregwebs. I've backported the relevant tweaks on the yesod-1.4
branch, to allow master to compile against persistent2. Whenever you're
ready to release persistent2, we can:

1. Release persistent2.
2. Release new versions of yesod packages, which will work with
   persistent 1.3 and 2.0.
3. Add an upper bound in Stackage to avoid using the new persistent
   libraries until they're ready for primetime.
4. Release your blog post.

yesod-1.4 should then remove the CPP here and only work with
persistent2; the biggest "breaking change" in the 1.4 release will be
remove backwards compatibility hacks for persistent, conduit,
shakespeare, and wai.
Merge branch 'master' into yesod-1.4

Conflicts:
	yesod-form/yesod-form.cabal