Simplify Rep hierarchy

- Remove ColumnBase: Its Shape needs to be split into tableShape and
  mappedProjectionShape, all other uses can be changed to Rep.

- Simplify Shape implicits: Only two implicit resolution levels are
  still needed (instead of four): constColumnShape gets priority (over
  columnShape), all other Shape implicits are defined at the highest
  level.

- Move Shapes for (Const)Column, Query and AbstractTable into the
  companion objects of the respective classes. This improves compilation
  times by lowering the number of Shape implicits in scope (on my laptop
  “sbt clean test:compile” took 115s before this commit; with the other
  changes but not moving the implicits around, it goes up to 120s; with
  segregated implicits it is down to 107s)

- Make ShapedValue extend Rep and remove extra methods for ShapedValue
  from the BasicProfile implicits

- Remove columnBaseToInsertInvoker and shapedValueToInsertInvoker from
  the BasicProfile implicits. They were left over from the old table
  encoding in Slick 1.
Remove UnshapedQueryExecutor

recordToUnshapedQueryExecutor in BasicProfile was limited to types
M <: Rep[_], which makes the whole thing completely unnecessary because
those cases are already covered by repToQueryExecutor. This could be
easily fixed by removing the Rep restriction, thus allowing queries
such as "(xs.length, xs.length).run" to work.

However, considering that a) we don't have any test case for this, b)
nobody seems to be missing this functionality, c) there aren't many
useful queries of this form that would pass the current query compiler,
d) there's an easy workaround ("(xs.length, xs.length).shaped.run"), and
e) recordToQueryExecutor can be used on Scala 2.11+, let's just remove
UnshapedQueryExecutor entirely and make recordToQueryExecutor implicit
for use use on Scala 2.11.

New test for the workaround in ExecutorTest.testExecutor.
Fix the Shape for Query.

It was still hardcoded to use Seq as the type constructor. Due to the
lack of inference for higher-kinded types in Scala, we need a workaround
similar to the one for tableShape to make this work correctly.
Add some missing cases to Compilable/Executable

- Provide a Shape for ShapedValue (to make it Executable).

- Remove the Rep restriction from executableIsCompilable.

- Provide real instances for Executable (which used to be a phantom
  type for functional dependencies with null values) so that it can
  provide a toNode implementation for non-Rep Executables.

- Prevent WrappingQuery type from leaking out of UNION operations.

Tests in TemplateTest.testCompiled.
Table constraints and indexes ordered by name. Generated DDL are then unique and thus, difference in DDL can only be the result of a change in the table. Fixes playframework/play-slick#146.
Merge pull request #840 from nremond/ordering_ddls

Ordering table constraints and indexes
Merge pull request #832 from slick/tmp/remove-columnbase

Some DSL improvements
Improve logging

- Use a better logger name for QueryCompiler benchmarks so it doesn’t
  get enabled by default together with the phase log.

- Generalize AST dumps to other trees

- Use the new Dumpable for ResultConverters and integrate the converter
  dump into the CompiledMapping node dump
Merge pull request #844 from slick/tmp/generalized-dump

Improve logging
Mark AccessDriver as deprecated.
Merge pull request #845 from slick/tmp/deprecate-access

Mark AccessDriver as deprecated.
The experimental patch to leave out parenthesis around the Union.

Let's say a example query.

  tabA.union(tabB).union(tabC)

this patch creates sql like below

  select ... from tA union select ... from tB union select ... from tC

original implementation creates below sql.

  select ... from (select ... from (select ... from tA union select ... from tB) union select ... from tC)

this patch is intended to solve the With Clause's parenthesis probelm
because there are some syntax restrictions like ORA-32042.

This patch doesn't use the Union in node permutation(fuse).
the Union is only used with Query.union,
and all union-ed nodes are collected to Comprehension's unionNodes as wrapper node InternalUnionNode.
so, there is no the Union in JdbcStatementBuilderComponent phase.

Problem
1:
With this patch, in the Derby DBMS, NewQuerySemanticsTest.scala:350 is not executed.
Otherwise, there is no problem in another DBMSs.
so, I think that maybe this is the Derby's bug.
As workaround, I skipped the line of the test only when the Derby DBMS is used.
Please check this.

Thanks.
Skipping parenthesis around the Join

Hi.

This is for the With clause, too.

Currently, the Slick creates sql about the Join.

```
select ... from (select ... from ...) ... join (select ... from ...) ... on ...
```

But, with some syntax restrictions like ORA-32042, below sql is not allowed.

```
with a(...) as (
  select ... from ...
  union
  select ....
  from (select ... from a) ...
  join (select ... from ...) ... on ...
)
select ... from a
```

Instead, below sql should be used.

```
with a(...) as (
  select ... from ...
  union
  select ....
  from a
  join (select ... from ...) ... on ...
)
select ... from a
```

Like above, This is for skipping parenthesis around the Join when the Join is very simple.
And, This is not intended as a workaround for bug or error. There is no problem in the Slick.
Instead, This is intended as preparing about the With clause.

Thanks.
Added MySQL-related codes.
Added test.
Added few string functions
Merge pull request #843 from dimitrkovalsky/tmp/string-functions

Added few string functions
Simply, go back to 9b0653c9666cf225758f86d2b758682aa0123a5b to retry another way.
There are no new custom codes.
Merge branch 'tmp/master' into tmp/another-with-clause
Simply, go back to 9b0653c9666cf225758f86d2b758682aa0123a5b to retry another way. There are no new custom codes.