Fixing incorrect behaviour with acquired permissions

Unwrapped comments rely on parent attributes to determine their parentage but these attributes are not reliably set by all content objects.  This causes unpredictable behaviour when attempting to determine whether anonymous users can view a comment (visible as incorrect comment count in the catalog).  This set of changes ensures that correctly wrapped comments are used for security checks.

I've also added a set of tests (based on pull request #26) to clarify the expected acquisition behaviour.