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
don't store signatures in notebooks

store them in an sqlite database instead.

The algorithm and signature are stored and not associated with a path.
This means that moving files around doesn't affect trust,
and every trusted change to a notebook remains trusted.
automatically cull oldest 25% of signatures

when cache size is reached
remove signatures from example notebook metadata
add counter to new notebooks in test_manager

ensures brand new notebooks are untrusted

previously, all new notebooks were identical,
so once one was trusted, they would all start trusted.