Refactored tests to perform same test in both a collection and a
connection context.

Added connection iteration.  

USERGRID-1046