check_write hook
This new hook will provide write permission enforcement inside the hg
process, hence in SSH push scenarios.
Lots of code is shared with check_publish
, hence we factorized, a good opportunity to
provide more details in docstrings.