Avoid swallowing AssertionError in test skipping logic

The logic designed to skip testcases when NotImplementedError
is raised by a storage driver can inadvertantly swallow a
failed assertion if the string representation happens to
include 'not implemented'.

Change-Id: I1c9e617a5dcb545941d92ed7a0d7cc702c407506
Ensure idempotency of cardinality reduction in mongo

Fixes bug 1297004

Previously, the reduce function for the cardinality aggregate was not
idempotent with respect to partially-reduced values.  This led to the
cardinality value being inaccuarate when the size of the mapped set
caused mongo to call reduce in multiple stages.

Now, the reduce function respects the implicit idempotency requirement.

Change-Id: Ia1e5f8dad43a9afbba8bace610e0d6574fb579cc
Merge "Avoid swallowing AssertionError in test skipping logic"
Merge "Ensure idempotency of cardinality reduction in mongo"