Refactoring primitive tests.

There doesn't seem much reason to have them grouped together as at
present. Hopefully I have improved the layout a bit.
Support for centroids of meshes. Not adequately tested.
Support for toruses. Not adequately tested.
More tests for primitives.