Move the 'packedObjects' convenience method from the BFG into scala-git

Also fix various Scala v2.11 compilation warnings.