Scalar parameters

A first step towards #205. Parameters can be declared as scalar, used in code and accessed using the standard group variable mechanism. Accessing the variables in non-scalar ways should raise errors, as does writing to them in abstract code. Internally, scalar variables are stored as an array of length 1.