Use async libpq interface for all queries

Support a timeout on query execution