hooked up listener with twisted

We now receive notifications about database changes basically
instantaneously and wait for them from the API threads.

Signed-off-by: Jan Dvořák <mordae@anilinux.org>
go back to 200 status responses

We now wait for the full change propagation and by the time we return
the data are already visible to the caller, which means that we can
safely return 200.

Signed-off-by: Jan Dvořák <mordae@anilinux.org>