Improve tests for lend views

Several Lend<X>TestCase classes have been rewritten to incorporate better tests.
This means two things:

1. The new ``random_lend_factory()`` function is used by several test cases when
   generating LendObjects.
2. The new ``http_dict`` method (on the Lend class) is used to encode a Lend
   object's attributes as a dict.

Also, several FIXMEs have been added to ``factories.py``.