doctest: fix tests when run under "nosetests --with-doctest"

nosetests cannot access the "samples" module so inline the Thing
class into the doctests so that they are self-contained.

Mention that objects must inherit from "object" (new-style classes).

Closes #38

Signed-off-by: David Aguilar <davvid@gmail.com>