Make configurable the number of incomplete lines before reconnect

Previously, if two incomplete lines were received in a row, this
caused a reconnect.  That was a bit low, causing some false
positives.  It should be configurable instead.