Cleanup and bug fix in XML factories

- Various cleanup.
- getParamStore didn't use the code mapping.
Updated param and param store tests

Tests are now handing a non-None (usually dummy) mapping to
getParameter when creating SParams. This change is made in anticipation
of a change in policy when creating SParams.
NParam and SParam inherit from Param

- Created a common base class Param which both NParam and SParam
inherit from.
- Creating an SParam with a None mapping is now illegal.
- Comparing a Param from equality takes mapping into consideration.

More detailed equality tests are needed.