Improve contact tests.

* Factor guid and uri in setUpClass.
* Test __repr__ is implemented and __str__ derived.