* apply policy per-course, even if multiple courses share course and org fields
* keep descriptors separate in xml store, so that if two such courses
change the same module in different ways, it works. Such edits will need to
merged on CMS import...
* add get_instance(course_id, location) method to replace get_item(location).
Update all the call sites
* tests, including a 2nd toy course with same course and org.
* if there is a policy.json in the course dir, read it
* file format is a dict with keys {category}/{url_name}, and values metadata dictionaries
* apply the policy, overwriting keys that are in the xml
* then do metadata inheritance, inheriting any overwritten keys.
* also a management cmd to generate a policy.json from a course dir.
* simplify logic--tracker just tracks errors. Trackers should not raise,
and are not be responsible for logging.
* adapted code to use trackers.
* Started cleanup of error handling code:
- if need to add info and re-raise, just do that. No logging.
- if working around a problem, log and track as needed.
* html files are now stored as follows:
If the html file is valid xml, store as html/stuff.xml
If it's not, store as html/stuff.xml, which contains
<html meta1="..." filename="stuff.html">,
and html/stuff.html, which actually contains the contents.
Warn if the contents are not parseable with lxml's html parser,
but don't error.
* for parseable html, strip out the html tag when storing, so that it isn't
rendered into the middle of a page
* lots of backcompat to deal with paths. Can go away soon.
* fix output ordering in clean_xml