kmod/core: protect kpatch_[un]register with mutex

Use a mutex in the register/unregister functions to protect changes to
kpatch_num_registered, kpatch_func_hash and calls to the ftrace
functions by other register/unregister invocations.
kmod/core: improve performance for cumulative patching

When multiple patch modules patch the same function, there's no need to
patch all the intermediate functions.  Just hook them all into the
original function and use the ftrace handler to find the newest one.

Also use a mutex in the register/unregister functions to protect changes
to kpatch_num_registered, kpatch_func_hash and calls to the ftrace
functions by other register/unregister invocations.
kmod/core: remove module argument from register

Now that we don't need to track module dependencies anymore, remove
the module argument from kpatch_[un]register.