Fix the waitOnDistribute Method
Fix the waitOnDistribute Method

Add a check in the wait distribute method to ensure that source node has
actual distributable docs before going in the waiting loop.  It seems like the
couch _replactor _replication_state never get set to 'completed' when the source
database is empty.

jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,LearningRegistry/LearningRegistry,jimklo/LearningRegistry,jimklo/LearningRegistry