Switch to scalac 2.11.2.

This also required updating a couple third-party packages, which
required updating our code to their new API (minor).

And the new compiler has already found two bugs, also fixed here.
Merge remote-tracking branch 'upstream/master' into ready/scalac-2.11

Need updated integration tests.
Merge pull request #290 from sellout/ready/scalac-2.11

Switch to scalac 2.11.2.