Add a function to generate a 'take' function ckernel_deferred
Implement indexed take as well
Fix bug revealed by valgrind on travisci
Merge pull request #32 from mwiebe/take_ckernel

Take ckernel_deferred