Query: Added Group class to help with input dimensionality constraints.

Added test for promoting 2D data to 3D.
Query: Further work on query input grouping.
Query: mostly finished input constraint grouping.

Moved Group class to its own file. May eventually allow access to
it from running filters.
Query: Fixed swizzle string operators.
Query: fixed dimensional rank promotion/demotion.

Reordering dimensions before adjusting rank.
Improved tests for whether to promote or demote.