updateReferenceWithHooks: test both branch/tag creation and deletion
Amend the tests I added in 9931076b (updateReferenceWithHooks: add tests for hook stdout/stderr output, 2020-11-18) to test both creation and deletion.
The immediate reason I need this is to port UserDeleteTag to Go[1], but more generally this improves our coverage. So let's do it in both the branch and tag case.