Reduce sql-api communication timeout, and allow overriding  it

Introduces new sqlapi.timeout directive, defaults to 100 ms
Includes testcase.
Closes #167