Rework Endmorphic without replacing the existing Endo

Thanks to Stephen Compall who submitted patches to the original branch.
Merge pull request #384 from bmjames/endomorphisms-redux

Generalised endomorphic arrows