core.c: Lookup primary parent rather than child in core_update_tree

for decrementing child counts (of parent)

Pointed-out-by: Ilya Nelkenbaum <ilyan@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: Eliminate unneeded call to core_update_tree in core_process_leave

as core_update_tree just returns when child is NULL

Signed-off-by: Hal Rosenstock <hal@mellanox.com>