Execute a callback at end of each traversal

We add this notification before entering a (potentially long) wait for
new DB updates so that the client can choose to finalize any processing
it might have been doing on earlier updates. The specific use case in
chttpd is to flush the client's internal buffer in a timely manner.

COUCHDB-2724
diff --git a/src/fabric_view_changes.erl b/src/fabric_view_changes.erl
index 7e6666c..7bb4217 100644
--- a/src/fabric_view_changes.erl
+++ b/src/fabric_view_changes.erl
@@ -84,15 +84,16 @@
         limit = Limit2,
         counters = NewSeqs,
         offset = Offset,
-        user_acc = AccOut
+        user_acc = AccOut0
     } = Collector,
     LastSeq = pack_seqs(NewSeqs),
     MaintenanceMode = config:get("couchdb", "maintenance_mode"),
     NewEpoch = get_changes_epoch() > erlang:get(changes_epoch),
     if Limit > Limit2, Feed == "longpoll";
       MaintenanceMode == "true"; MaintenanceMode == "nolb"; NewEpoch ->
-        Callback({stop, LastSeq, pending_count(Offset)}, AccOut);
+        Callback({stop, LastSeq, pending_count(Offset)}, AccOut0);
     true ->
+        {ok, AccOut} = Callback(waiting_for_updates, AccOut0),
         WaitForUpdate = wait_db_updated(UpListen),
         AccumulatedTime = timer:now_diff(os:timestamp(), T0) div 1000,
         Max = case config:get("fabric", "changes_duration") of