Add a test to make sure the sparse extension works with non-sparse
repositories. The share extension can cause the sparse extension to be loaded
even if the current working directory is not sparse.
Currently "hg diff" crashes in this scenario. After the changes in D788, it
now tries to run repo.sparsematch() without first checking to see if the
repository is actually a sparse repository.