Simplify the creation of packed Shape of QueryParameters.

~> was not used anywhere and NaturalTransformation2 was unnecessarily
general. We can safely remove both of them and add a dedicated method
Shape.buildParams for building the packed Shape in a way that is much
easier to comprehend.
Move encodeRef functionality for container types into Shape.

This allows the implementation of Shapes for custom containers which
was previously not possible due to the requirement to have
EncodeRef.apply know about container types.

The remainder of the EncodeRef trait is moved into the "lifted" package
because it is an implementation detail of the lifted embedding, not of
the AST.
Move the conversion of values to Nodes into Shape.

Node.apply had a hard-coded conversion for Product. This needs to be
handled by the Shape if we want to support custom Shapes for other
container types.

We can also disentangle Node from NodeGenerator. Multi-level indirection
is no longer necessary with the clear separation between the AST and the
lifted embedding that we have now.
Remove Node.apply and rename NodeGenerator.nodeDelegate to .toNode.

- After the previous commit, a Node is no longer a NodeGenerator so
  there cannot be any multi-level indirection for narrowing a
  NodeGenerator to a Node, thus obviating the need for a separate
  function (Node.apply). The new name .toNode for .nodeDelegate is
  shorter and consistent with the naming in Shape.

- Move NodeGenerator from .ast to .lifted. It is now purely an artifact
  of the lifted embedding and no longer used by the AST.

- Rename .packedNode in ShapedValue to .toNode and make ShapedValue a
  NodeGenerator for consistency. The notion of a "packed node" is no
  longer meaningful after the separation of lifted embedding and AST.
Support for easy type mapping in Shapes.

- New abstract classes ProductNodeShape and MappedProductShape simplify
  the implementation of custom Shapes.

- Add ProductWrapper as an untyped Product of arbitrary arity. This is
  now built by TupleSupport.buildTuple for arities > 22 instead of
  failing at runtime. Since Tuple shapes are not available for such
  arities, it is only used as an intermediate representation for custom
  Shapes. Converting from a ResultSet to an IndexedSeq, then a Product
  and finally the real mapped type is wasteful. We should improve this
  in the future with an unboxed fast access path for mapped types.

- Fix a bug with useIntForBoolean in the SQL QueryBuilder.

- Allow type member selection on MappedScalaType. Since the mapping
  applies to the client side only, this is treated the same as selecting
  from the base type.

- Add a new test case MapperTest.testCustomShape.
Simplify the Shape API + implementation and MapperTest

testWideMappedEntity is much simpler now with the new table definitions
based on ProvenShape and it can do proper bidirectional mappings.

EncodeRef and NodeGenerator are no longer necessary. The only relevant
implementations (that actually need to go through the traits for that
functionality) are in Rep classes. We can safely place the methods
encodeRef and toNode directly into Rep.
Merge pull request #185 from slick/tmp/custom-shapes

Add support for custom shapes