Fix broken things

Two issues:

- doctests with infinite loops in them
  - one of them was even a syntactically invalid doctest
- use of `nose.plugins.attrib.attr` on a TestCase class, which is not allowed

![look_of_disapproval](https://f.cloud.github.com/assets/464394/280078/1004580e-9147-11e2-9097-4f5d493e1bd3.png)

This was causing a build failure: http://ci.openquake.org/job/oq-risklib/77/