Transform/extension methods

New phase ported: extension methods
I'm not sure how code in the typer would kick in for the body of this generated forwarder.

Here's the test case I was trying to run:

```scala
class Testable(val c: String) extends AnyVal {
  def matching(cases: Boolean*) = cases contains true
}

object Test extends App {
  assert(new Testable("").matching(true, false))
}
```

(Here's the related bug fix in the old impl: https://github.com/scala/scala/commit/1e0a30a744e6853b1e69928a63b327226f4bf27f)

I patched a few things, but didn't quite get through the intervening problems:

```diff
diff --git a/bin/dotc b/bin/dotc
index eaaf9c7..11df533 100755
--- a/bin/dotc
+++ b/bin/dotc
@@ -6,3 +6,3 @@
 # Configuration
-SCALA_VERSION=2.11.0-M7
+SCALA_VERSION=2.11.0-RC3
 DOTTY_VERSION=0.1
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 6421018..bd82c58 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -393,3 +393,2 @@ object Symbols {
     final def isDerivedValueClass(implicit ctx: Context): Boolean =
-      false && // value classes are not supported yet
       isClass && denot.derivesFrom(defn.AnyValClass) && !isPrimitiveValueClass
@@ -465,3 +464,3 @@ object Symbols {
       if (lastDenot == null) s"Naked$prefixString#$id"
-      else lastDenot.toString// +"#"+id // !!! DEBUG
+      else lastDenot.toString +"#"+id // !!! DEBUG
 
diff --git a/src/dotty/tools/dotc/core/transform/Erasure.scala b/src/dotty/tools/dotc/core/transform/Erasure.scala
index e35cdd1..e7c544a 100644
--- a/src/dotty/tools/dotc/core/transform/Erasure.scala
+++ b/src/dotty/tools/dotc/core/transform/Erasure.scala
@@ -163,3 +163,4 @@ class Erasure(isJava: Boolean, isSemi: Boolean, isConstructor: Boolean, wildcard
   private def eraseDerivedValueClassRef(tref: TypeRef)(implicit ctx: Context): Type =
-    unsupported("eraseDerivedValueClass")
+    defn.AnyRefType
+//    unsupported("eraseDerivedValueClass")
 
diff --git a/src/dotty/tools/dotc/transform/ExtensionMethods.scala b/src/dotty/tools/dotc/transform/ExtensionMethods.scala
index 55b53ef..3abf90c 100644
--- a/src/dotty/tools/dotc/transform/ExtensionMethods.scala
+++ b/src/dotty/tools/dotc/transform/ExtensionMethods.scala
@@ -57,3 +57,3 @@ class ExtensionMethods extends MacroTransform with IdentityDenotTransformer { th
         val alts = decl.alternatives
-        val index = alts indexOf imeth
+        val index = alts indexOf imeth.denot
         assert(index >= 0, alts+" does not contain "+imeth)
@@ -163,2 +163,3 @@ class ExtensionMethods extends MacroTransform with IdentityDenotTransformer { th
             .withPos(rhs.pos)
+          println(forwarder)
           cpy.DefDef(tree, mods, name, tparams, vparamss, tpt, forwarder)

```

```
Exception in thread "main" java.util.NoSuchElementException: key not found: class Testable#5035
	at scala.collection.MapLike$class.default(MapLike.scala:228)
	at scala.collection.AbstractMap.default(Map.scala:59)
```