Add tests for reference count leaks

Base class will now explicitly delete and monitor the connection object
and its reference count.

Additionally, exception objects holding references to the frame are
deleted as well.

Change-Id: I4148834ab76182e1f45934354677ecfce0407f3a
Reviewed-on: http://review.couchbase.org/26657
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>