Do not skip heartbeats when DB is updated
Do not skip heartbeats when DB is updated

This patch ensures that we send a heartbeat line in the case of regular
writes to a database, each of which fails the filter condition.
Previously we could go long intervals without sending a heartbeat if the
wait_db_updated/1 function returned 'updated' and all of the updates
failed the filter.  We'd never reach the five second timeout required to
send a heartbeat inside receive_results, and we'd never send a heartbeat
from the 'timeout' clause of the keep_sending_changes function.  These
long intervals would cause a replication to crash.

The patch causes a heartbeat to be sent on every invocation of
wait_db_updated/1.  Big thanks to Paul Davis for deducing the cause of
the timeouts.

BugzID: 12605

fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb