Fix RESTfulness of project hook deletions by API

Fixes #2878