kmod/core: new API and kpatch_funcs_hash

This PR depends on #62.