Handle query error in get_query_result()

Problem:
get_query_result() in opserver_util.py doesn't handle error properly and keeps
retrying/looping till the 'progress' is 100. contrail-logs script uses get_query_result()
to read the query result and hence gets stuck in case of error.

Fix:
If contrail-query-engine returns negative value in 'progress', print error message and return

Side-effect:
This change caused test_00_nocassandra test case failure. verify_collector_obj_count() should
not be called for test_00_nocassandra test as cassandra would not be started and therefore query-engine
would return error. This test case was passing because the get_query_result() was returning [{}] on
time out and assert(len(res) > 0) passed. With the error handling code in place, get_query_result()
returns [] and hence this test case failed. Fixing this test by not calling verify_collector_obj_count().

Change-Id: I2313dd8185b3bfc0dae1363378711508752b00c5
Closes-Bug: #1383602
Merge "Handle query error in get_query_result()"