795 delete repository asynchonously

Shall fix #795.

I created this branch on top of #1026, not on top of staging.
Please use lambda-syntax for the actual scope. As we will use rails 4 in the future this would reduce the necessary changes.