Add option to connection to set write timeouts

[#1091]
Merge branch 'feature/add-write-timeout-option'