Add functions for use by LendForm.clean()

These functions are all module-wide private functions, and they do things like
creating messages and checking whether a date lies within a particular range.

These functions are not yet doing anything. They are syntactically correct, but
no other code calls them.
Run doctests in forms.py

Whenever the test suite is run, doctests in `forms.py` are discovered and run.
Rewrite function LendForm.clean()

This function now uses the private utility functions available in this module
to do it's work. This function now also performs more checks than it used to do.
Specifically, it makes sure that an item cannot be reserved or lent out multiple
times.