alters database cleaning for rspec to avoid race conditions

Tries to implement a different way for cleaning the DB when running rspec tests.

This is taken 100% from [stackoverflow](http://stackoverflow.com/questions/21922046/deadlock-detected-with-capybara-webkit).

Without the changes, the capybara powered specs fail often on my machine due to race conditions where the thread running the tests was trying to access data the thread running the backend had not yet created. After the fix, that never happened to me. Additionally,  the specs run faster on my machine (subjective).

Please try whether this also works on your machine(s).
@myabc: Because after the update it is also working for mysql. Not sure about the performance impacts there but on my system it didn't look worse than truncation. Plus, I also ran into some deadlocks and other race conditions on mysql which where fixed by the deletion strategy.