port to Scala 2.9.x, add missing class, use serialization trait , add bu...

...ild.sbt
(another pull that should go to a 2.9.x branch)