common: add session context
common: add session context

Add a `SessionContext` trait that encapsulates diagnostic emission and
checking if certain options are set in the session. This should simplify
contexts further down the line in the compiler.

fabianschuiki/moore,fabianschuiki/moore,fabianschuiki/moore,fabianschuiki/moore,fabianschuiki/moore