Make Diagrams.Transform.under more polymorphic

After writing my own diagram types (for diagrams in R2), i found myself needing to do some DiagType1 -> DiagType2 operations under a transformation. This is not possible under the current type of 'under', so here it is, generalized.