795 delete repository asynchonously

Shall fix #795.

I created this branch on top of #1026, not on top of staging.
Same as above please use the lambda syntax: `scope :active, ->() { where(destroying: false) }`