abstract some methods in contents service tests

should allow re-use for ContentsManager subclasses

closes #7190

I don't have a ContentsManager to verify this against, so I'd like to hear from @ssanderson on this one, and we can iron out details.
Fair enough.  Trying to decide now if that means I should write a direct-to-database equivalent for myself.