Wtforms2 support

Work against WTForms2 tip.

**NOTE** This pull request includes changes from #6 which were required to get things working so I could test properly without failures. Recommend merging #6 before merging this pull request.