[dbwriter] mild refactor
[dbwriter] mild refactor

Summary: Use `SqliteUtils.exec` where appropriate, reformat some queries for readability.

Reviewed By: ezgicicek

Differential Revision: D23240945

fbshipit-source-id: 24d921a3a

facebook/infer,facebook/infer,facebook/infer,jvillard/infer,facebook/infer,facebook/infer,jvillard/infer,jvillard/infer,jvillard/infer,jvillard/infer,facebook/infer,jvillard/infer,facebook/infer,jvillard/infer