Kmem rework

This is a companion for zfsonlinux/spl#369.