Support undeleting keys

Due to the fact that deleting a key doesn't actually delete it from the db (it just sets it's deleted_at time), re-adding a key which has been deleted currently causes a 500 error with a log message of:

```
duplicate key value violates unique constraint "keys_pkey"
```

I have updated the logic so that if the key being added is a deleted key, set it's deleted_at back to NULL.