Define kwapply as a macro

Also:
* Now kwapply is a macro
* Define apply if python3 
* Added apply tests

I would consider a name change for kwapply as it might be confusing due to different function's signature between apply and kwapply

I'll close #239 as this fixes calling kwapply multiple times also