Fix opts check when compiler called with dict opts
Fix opts check when compiler called with dict opts

rebar_base_compiler allows to be called with two types of options: a
dictionary, or a rebar_state record. In the later case, the options are
taken out with a call from rebar_opts, which fetches options that have
been inserted in the application via rebar_app_info as part of the
app_discovery phase, and are a list.

This yields a possibility that options used when formatting warnings can
either be a list of a dict, and we only used lists when making checks.
This ended up breaking 3rd party compiler users (i.e. LFE compile
plugin) since they were calling us with a dict rather than our own
internal records.

This patch supports both types of lookups to avoid issues.

erlang/rebar3,vladdu/rebar3,benoitc/rebar3,norton/rebar3,rebar/rebar3,saleyn/rebar3,tsloughter/rebar3,lrascao/rebar3,benoitc/rebar3,rebar/rebar3,ferd/rebar3,djnym/rebar3