update group leaders when restarting user process

ensure any processes with a reference to an old user process as their
group leader are updated to use the new user process. this introduces a
slight delay at startup as the system must wait for the new processes
to be registered. there is a max wait period of three seconds (before
the shell command gives up and throws a timeout error)

fixes #314 ("rebar shell" somehow blocks using io:format in gen_server
handle_call)
Merge pull request #316 from talentdeficit/rebar_shell_314

fix for #314 (rebar shell somehow blocks using io:format in gen_server handle_call)