Fix deadlock in ServiceDbConnect::Add{Comments,Downtimes}.

Fixes #5286