svn-hooks: rename post-commit-background

Use "bg" instead of "background".
Share Trac logic between post-commit-bg and post-revprop-change-bg.
svn-hooks: add tests for pre-commit