Fix the test suite
The wtforms behavior changed in newer version adding support for the
html5 "required" tag in the input fields that are required.
This commit adjusts the test for this change.
We're also only pre-filling the ElectionForm when doing GET request as
otherwise required fields may be populated while the POST request did
not provide them.
Finally, we add a couple of utility methods to retrieve the version of
the wtforms library in use and to retrieve a CSRF token.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>