MB-11178: Add flow logic to IBR tool

Change-Id: I50cb182b25fbb8cc70a1c87a29664b010fdec794
Reviewed-on: http://review.couchbase.org/37412
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>