Orphaned deploy keys don't get deleted
Created by: m-o-e
Steps to reproduce:
- Create project, add one deploy key.
- Delete project
Expected behaviour: The orphaned deploy key is deleted from the database and authorized_keys.
Observed behaviour: The deploy key sticks around in the database and authorized_keys file and is effectively blocked from further use. I.e. it doesn't show up in the list of available deploy keys because it's not in a "project you have access to" anymore (the project was deleted). And it can not be re-added as a new deploy key because it still exists in the database.