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.