Generalize coproduct codec derivation to prepare for unions; align naming with shapeless