SI-8931 make generic signature consistent with interface list in classfiles

An optimization was introduced in 7a99c03 ([SI-5278][1]) to remove redundant
interfaces from the list of implemented interfaces in the bytecode.
However the same change was not propagated to the generic signature
of a class, which also contains a list of direct parent classes and
interfaces.

The JVM does not check the well-formedness of signatures at class
loading or linking (see §4.3.4 of jdk7 jvms), but other tools might
assume the number of implemented interfaces is the same whether one
asked for generic or erased interfaces.

It doesn't break reflection so nobody complained, but it does show:
```scala
scala> val c = classOf[Tuple1[String]]
c: Class[(String,)] = class scala.Tuple1

scala> c.getInterfaces // Product is gone
res0: Array[Class[_]] = Array(interface scala.Product1, interface
scala.Serializable)

scala> c.getGenericInterfaces // Product is back!
res1: Array[java.lang.reflect.Type] = Array(scala.Product1<T1>,
interface scala.Product, interface scala.Serializable)
```
This moves the optimization to erasure, for use in emitting the generic
signature, and the backend calls into it later for the list of
interfaces.

[1]: https://issues.scala-lang.org/browse/SI-5278
I think we can factor out insertion of `Object` into the list of parents here.

```
def isInterfaceOrTrait(sym: Symbol) sym.isInterface || sym.isTrait

// a signature should always start with a class
def ensureClassAsFirstParent(tps: List[Type]) = tps match {
  case Nil => ObjectTpe :: Nil
  case head :: tail if isInterfaceOrTrait(head.typeSymbol) => ObjectTpe :: tps
  case _ => tps
}

val validParents = 
  if (isTraitSignature)
    minParents filter isInterfaceOrTrait // java is unthrilled about seeing interfaces inherit from classes
  else minParents
ensureClassAsFirstParent(validParents)
```