Fix some Scala 2.10 errors, warnings and deprecations.