Added a database interface and a relevant non blocking postgres implementation of it

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>