duchain: change trait and impl contexts to class

Authored by egospodinova on Jul 27 2017, 3:02 PM.