Encode MappedProjections in the AST.

As you can see from the size and scope of this commit, that was not as
easy as it sounds.

- MappedProjections now create a TypeMapping node with a MappedScalaType.
- We cannot hoist it in hoistClientOps together with the other type
  conversions because it affects multiple columns, combining them into
  one, so it needs to be done before columnization.
- TypeMappings can be contained in table expansions, so we need to run
  expandTables earlier. Not only does this not cause any problems, it
  also solves the problem that expandTables had to know up to which
  other phase to run the query compiler on the expanded trees. Now it can
  simply run all phases before itself.
- Converting the top-level node to a Collection-valued Bind is moved from
  forceOuterBinds into a separate phase createResultSetMapping where we
  create the ResultSetMapping, make its server-side content collection-
  valued if needed (with a corresponding First node on top of the client
  side to revert that operation) and create a client-side mapping based
  on the result type. This materializes all required TypeMappings on the
  client side and we simply remove them from the server side (where they
  have no effect anyway).
- Further compiler phases skip the client-side operations and only rewrite
  the server side (as before).
- In hoistClientOps we create a second ResultSetMapping (with the
  existing code there) and fuse it with the first one (which was much
  simpler to implement than doing the hoisting directly on the monadic
  trees in createResultSetMapping).