Content - ContentTypes ContentTypeResource and ContentUnitsCollections

I thought these three would share more code than they ended up sharing so I combined them. The next one looks more complex though, so decided to make this PR now.
My solution https://github.com/pulp/pulp/pull/1442 will allow all tests to run when initiated by `run-tests.py`. I agree with @rbarlow that it is worthwhile to be able to run a test individually using nosetests, so as sloppy as it is, I think that the solution is to also place an `if __name__ == "__main__":` that sets the environment until we use the Django test runner.