Yakk's changes.
My siplifications.
Use tag dispatching for curry_t::invoke.
Minor changes for g++ compilability and C++11.
Reorder invoke definitions.