Backport of various things from shapeless 2.3 to shapeless 2.2

Latest version

[![shapeless-compat Scala version support](https://index.scala-lang.org/alexarchambault/shapeless-compat/shapeless-compat/latest.svg](https://index.scala-lang.org/alexarchambault/shapeless-compat/shapeless-compat)

JVM badge

[![shapeless-compat Scala version support](https://index.scala-lang.org/alexarchambault/shapeless-compat/shapeless-compat/latest-by-scala-version.svg?platform=jvm](https://index.scala-lang.org/alexarchambault/shapeless-compat/shapeless-compat)

Scala.js 0.6 badge

[![shapeless-compat Scala version support](https://index.scala-lang.org/alexarchambault/shapeless-compat/shapeless-compat/latest-by-scala-version.svg?platform=sjs0.6](https://index.scala-lang.org/alexarchambault/shapeless-compat/shapeless-compat)