abstract some methods in contents service tests

should allow re-use for ContentsManager subclasses
BUG: Set default mimetype when base64 is requested
BUG: Sanitize to_path in ContentsManager.copy.

Without this, one of the test cases in `test_copy` attempts a copy to a
directory that starts with a leading double-slash.
BUG: Allow for the possibility that to_path is empty string.

This is a legal input for representing the root directory.
TEST: Expect a 404 on delete of non-existent file.
TEST: More fine-grained test for directory contents.

Verify that each entry in a directory listing matches the result of a
content-less direct get.
TEST: Add checks for subdirectory name splitting.

Previously the tests failed to catch a bug where a ContentsManager
didn't split name from path in a nested subdirectory.
move symlink tests to TestFileManager
TEST: Refactor symlink tests.
TEST: Abstract out directory/file deletion methods.
MAINT: Remove unused blob and b64_blob attributes.
TEST: Verify base64 return values after decoding.
BUG: Convert to bytes before comparing binary blobs.
STY: Define dirs as a single expression.
TEST: Add a non-notebook file to directory test.
MAINT: Unicode literal in assertDictContainsSubset
docstring on test_dir
Merge pull request #7191 from minrk/contents-test-reuse

abstract some methods in contents service tests