Fix regression in the way impl class are encoded.
Upgrade to Scala 2.11.0-M4.

And all the changes need to adapt to the new internal API
of the compiler, and other small things.
Upgrade to Scala 2.11.0-M5.

Again with the required changes.