refactor codegen to make it more flexible and concise
rename kergen ==> ktype
reduce using new codegen framework
wsum using new codegen framework
new core skeleton for reduction along dimensions
new core skeleton for wsum