Optimize the apply metafunction.

Basic re-run of the vector benchmarks show significant improvements
in compile-time. It makes sense, since we don't mention as many
templates as before and we don't require complex overload resolution.