CBQE-0: fix rebalance_out_with_ddoc_compaction:

check fragmentation_monitor.state before query_view

Change-Id: Ifddeeba44351698d0b2aa555b1f97e8143c46586
Reviewed-on: http://review.couchbase.org/37905
Reviewed-by: Iryna Mironava <irynamironava@yandex.ru>
Tested-by: buildbot <build@couchbase.com>