kmod/core: fixes in the unregister path

A few fixes in the unregister path:
- always decrement kpatch_num_registered
- return -EINVAL if not enabled