add more tests of custom managers and add support for django 1.5 and 1.6's patterns for empty querysets