Making the envelope code more general and less specific to one kind of classical envelope

I had created ADSREnvelope, but synths even in the 80s had
multi-segment decays so I set about improving that. I ended up
generalising attack and decay into the same notion of transition and
did the same for release, which cleaned things up somewhat.