partial-copy: remove unused refs

Remove all refs from partial-copy that not longer exists in main.
Also remove all refs from partial-copy that are not longer accessible, due to
changed rights.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
fork command should add hooks from LOCAL_CODE if defined
create command should think of default roles also...

Some code is duplicated from 'set-default-roles' trigger but it's the
cleanest way to fix the problem.
check file/dir existence before locking

check for existence of the object across all branches before creating
the lock.  Helps catch silent typos which may make people think they
locked the file but actually did not.

[code and commit message somewhat edited by committer]
help: include SITE_INFO in output
setup some ENV vars from gitolite.conf options...

makes things much easier in hooks and triggers
v3.5.2