upgrade to scala 2.11
make `Unit` a case object

Problem: The type of `object X` is `X.type`, not `X`.

Solution: Given that types and objects have separate name spaces,
we can define a type synonym `Unit`, shadowing the default Unit
type.
answer question

> TODO:  This requires a type annotation for the EP, why?<

Because the type inference of Scalac can't figure it out.
Personally I find it helpful to think of type inference
of scalac as a top-down pass followed by a bottom-up
pass. If not enough annotations exist on the outermost
construct (`RType` in this case), then:

- The leaves of the expression must be annotated enough
  to determine their types without outside information,
  and

- The type of every construct must be deduceable from
  the type of its arguments.
make LIGD compile under scala 2.11

Heuristic: If type annotation is necessary in a pattern,
then it's safest to annotate the pattern at the top level.
Merge pull request #1 from yfcai/master

Upgrade to Scala 2.11