Issues fix for USERGRID-3011.

Added test cases proving issue by deleting entities with preexisting connections.