Move ComposedFunctor::prepare implementation into standalone functions
In order to reduce the names of the generated types for prepared composite functors, move the code which creates these types into standalone (templated) functions inside of embedding them in a templated class.
This idea is inspired by the proof of concept mentioned in this comment
Edited by Gerhard Raven