CBQE-0: Test collectinfo_test_for_views was not found

fix Test clitest.collectinfotest.collectinfoTests.collectinfo_test_for_views was not found
+ refactoring

Change-Id: I21ddf3946a3b57c595bc9f6244a589223d9a60d5
Reviewed-on: http://review.couchbase.org/31538
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>
Tested-by: Andrei Baranouski <andrei.baranouski@gmail.com>