cache/api: prevent deadlock on kr_cache_remove with multiple processes
Only the `kr_cache_remove_subtree` called `kr_cache_sync` to commit
the write transaction after cache removal operation. This wasn't
done in the `kr_cache_remove` so the write transaction could be
long-lived.
With two or more processes, if one help the write transaction open,
no other process could open it. If the process holding the transaction
would call IPC to other processes and wait, it would never release
it and the other processes could never acquire it, and deadlock
would occur.