Allow users to override connection keep alive logic

Implements #733 for 1.9.x.
Add missing headers and comments

Mea culpa, I should know better by now.
Merge pull request #753 from barnardb/1.9.x-keep-alive-strategy

[1.9.x] Allow users to override connection keep alive logic