Move lock_many implementation to the model

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Don't hardcode test engine_url

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Set full path to test sqlite db

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add RaceConditionError

We'll raise this when the only way to avoid a race condition is to have
the client repeat the request

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Retry when we hit a RaceConditionError

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Simplify request handling

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Set serializable isolation level by default

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add test for lock_many race condition

This test requires paddles to be running in a multi-worker mode, or else
it is skipped.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
Add teardown method

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>