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.
It doesn't *have* to be overridden per se, but yeah, it probably makes sense to note that you want to override it if you create "directories" in a way other than making filesystem directories.