Add diameter variable to the sphere, cylinder and circle primitives (fixes #392).

When doing the lookup, the diameter value has priority so if both diameter
and radius are given, the radius value is ignored and a warning is printed.
Extend sphere tests to cover the new diameter parameter.
Add cylinder tests to cover the new diameter parameters.
Extend circle tests to cover the new diameter parameter.
Merge pull request #509 from t-paul/issue392

Add diameter variable to the sphere, cylinder and circle primitives.