Add api_timeout config param.
Add test for api_timeout.
Minor test cleanup.
Merge branch 'feature/issue-37-http-timeout' into develop