Modifies the counter for local thread IDs
(cherry picked from commit a1882929c3919598a4a0a99ff2a018c6512b118e)
Untangles dependencies if ipc and thread lib.
Removes indirection of calls between Ipc_message_queue and Ipc_manager
via Thread_utcb.
(cherry picked from commit 34826120212874ce2e75df62df8c69d574054235)
Resolves merge conflicts from done cherry pick