Reduce mongo calls on course outline and container pages

STUD-2076. @cahrens @dan-f @dmitchell please review.

Optimizations in this pull request:
* `_course_outline_json` takes a course xblock instead of a course_key. This avoids reading the entire course tree from the database twice.
* `compute_publish_state`, which is used by `has_changes`, uses a new `lookup_item` method on the xblock runtime instead of directly calling `get_item` on the modulestore. This allows the lookup to use the cached course tree.
* Uses of `has_item` are replaced by a corresponding call to `compute_publish_state` and equality comparison with the appropriate `PublishState` value. This takes advantage of the optimization above.
I looked into doing that, but the tests in `test_item.py` are mostly for AJAX handlers. Many of the tests don't have a direct handle to the xblock before calling these methods, so I felt it was cleaner to do it this way rather than littering the individual tests with `get_item` calls.