sys_pre_expand: Clean up data structures
sys_pre_expand: Clean up data structures

The handling of non-remote calls is messy, with several lookups
to determine whether the call is local or to some imported module.

We can simplify the code if we keep a map that immediately gives
us the answer. Here is an example of what the map entries look
like:

  {f,1} => local
  {foldl,3} => {imported,lists}

That is, there should be a local call to f/1 and a remote call
to lists:foldl/3.

Note that there is no longer any need to keep the set of all defined
functions in the state record.

aboroska/otp,vladdu/otp,vinoski/otp,saleyn/otp,goertzenator/otp,mikpe/otp,basho/otp,matwey/otp,bugs-erlang-org/otp,ahmedshafeeq/otp,matwey/otp,lightcyphers/otp,bugs-erlang-org/otp,RoadRunnr/otp,lightcyphers/otp,goertzenator/otp,uabboli/otp,saleyn/otp,rlipscombe/otp,bsmr-erlang/otp,cobusc/otp,bsmr-erlang/otp,basho/otp,falkevik/otp,emile/otp,neeraj9/otp,ahmedshafeeq/otp,saleyn/otp,emile/otp,mikpe/otp,dumbbell/otp,cobusc/otp,psyeugenic/otp,emile/otp,isvilen/otp,kvakvs/otp,rlipscombe/otp,emacsmirror/erlang,lrascao/otp,getong/otp,jj1bdx/otp,lemenkov/otp,erlang/otp,potatosalad/otp,bsmr-erlang/otp,emacsmirror/erlang,massemanet/otp,legoscia/otp,aboroska/otp,kvakvs/otp,electricimp/otp,RaimoNiskanen/otp,getong/otp,bernardd/otp,cobusc/otp,jj1bdx/otp,bjorng/otp,goertzenator/otp,goertzenator/otp,tuncer/otp,goertzenator/otp,RoadRunnr/otp,weisslj/otp,dgud/otp,lrascao/otp,dgud/otp,legoscia/otp,falkevik/otp,isvilen/otp,lightcyphers/otp,fenollp/otp,basho/otp,dgud/otp,release-project/otp,vinoski/otp,erlang/otp,mikpe/otp,dumbbell/otp,weisslj/otp,emacsmirror/erlang,rlipscombe/otp,mikpe/otp,aboroska/otp,massemanet/otp,weisslj/otp,emacsmirror/erlang,vladdu/otp,lrascao/otp,vladdu/otp,electricimp/otp,rlipscombe/otp,lemenkov/otp,fenollp/otp,RaimoNiskanen/otp,ferd/otp,dumbbell/otp,potatosalad/otp,saleyn/otp,bsmr-erlang/otp,neeraj9/otp,aboroska/otp,legoscia/otp,vinoski/otp,basho/otp,uabboli/otp,isvilen/otp,lemenkov/otp,saleyn/otp,neeraj9/otp,lemenkov/otp,RoadRunnr/otp,legoscia/otp,kvakvs/otp,bjorng/otp,tuncer/otp,kvakvs/otp,kvakvs/otp,legoscia/otp,weisslj/otp,fenollp/otp,getong/otp,dgud/otp,uabboli/otp,release-project/otp,neeraj9/otp,falkevik/otp,lightcyphers/otp,ferd/otp,release-project/otp,potatosalad/otp,dumbbell/otp,cobusc/otp,erlang/otp,mikpe/otp,bjorng/otp,lightcyphers/otp,jj1bdx/otp,bsmr-erlang/otp,falkevik/otp,lightcyphers/otp,release-project/otp,erlang/otp,aboroska/otp,saleyn/otp,dgud/otp,getong/otp,vinoski/otp,falkevik/otp,basho/otp,legoscia/otp,lemenkov/otp,potatosalad/otp,dgud/otp,bernardd/otp,fenollp/otp,isvilen/otp,bjorng/otp,RoadRunnr/otp,bjorng/otp,vinoski/otp,bernardd/otp,falkevik/otp,bsmr-erlang/otp,psyeugenic/otp,emacsmirror/erlang,uabboli/otp,mikpe/otp,vladdu/otp,vladdu/otp,release-project/otp,release-project/otp,vinoski/otp,erlang/otp,emile/otp,emile/otp,saleyn/otp,bugs-erlang-org/otp,cobusc/otp,jj1bdx/otp,goertzenator/otp,ferd/otp,rlipscombe/otp,jj1bdx/otp,RaimoNiskanen/otp,ahmedshafeeq/otp,falkevik/otp,RoadRunnr/otp,matwey/otp,potatosalad/otp,bugs-erlang-org/otp,saleyn/otp,RaimoNiskanen/otp,emile/otp,aboroska/otp,aboroska/otp,rlipscombe/otp,dumbbell/otp,bjorng/otp,ferd/otp,emile/otp,vinoski/otp,isvilen/otp,ferd/otp,basho/otp,uabboli/otp,uabboli/otp,bsmr-erlang/otp,isvilen/otp,emile/otp,goertzenator/otp,bernardd/otp,ahmedshafeeq/otp,psyeugenic/otp,psyeugenic/otp,g-andrade/otp,neeraj9/otp,lightcyphers/otp,bjorng/otp,cobusc/otp,dumbbell/otp,rlipscombe/otp,aboroska/otp,RoadRunnr/otp,lrascao/otp,matwey/otp,psyeugenic/otp,getong/otp,fenollp/otp,getong/otp,emacsmirror/erlang,RoadRunnr/otp,RaimoNiskanen/otp,massemanet/otp,bernardd/otp,tuncer/otp,erlang/otp,potatosalad/otp,basho/otp,jj1bdx/otp,lrascao/otp,lrascao/otp,electricimp/otp,getong/otp,RaimoNiskanen/otp,goertzenator/otp,uabboli/otp,lemenkov/otp,dumbbell/otp,isvilen/otp,ahmedshafeeq/otp,ferd/otp,erlang/otp,jj1bdx/otp,massemanet/otp,neeraj9/otp,fenollp/otp,vladdu/otp,ahmedshafeeq/otp,bugs-erlang-org/otp,electricimp/otp,basho/otp,bernardd/otp,tuncer/otp,falkevik/otp,mikpe/otp,massemanet/otp,electricimp/otp,ahmedshafeeq/otp,legoscia/otp,matwey/otp,ahmedshafeeq/otp,dgud/otp,ferd/otp,ferd/otp,g-andrade/otp,RoadRunnr/otp,tuncer/otp,kvakvs/otp,emacsmirror/erlang,g-andrade/otp,weisslj/otp,jj1bdx/otp,aboroska/otp,lemenkov/otp,cobusc/otp,isvilen/otp,release-project/otp,emacsmirror/erlang,RaimoNiskanen/otp,massemanet/otp,neeraj9/otp,lemenkov/otp,vinoski/otp,saleyn/otp,erlang/otp,g-andrade/otp,potatosalad/otp,massemanet/otp,bernardd/otp,RaimoNiskanen/otp,lightcyphers/otp,release-project/otp,ferd/otp,bjorng/otp,electricimp/otp,g-andrade/otp,isvilen/otp,dumbbell/otp,jj1bdx/otp,matwey/otp,fenollp/otp,release-project/otp,basho/otp,mikpe/otp,lrascao/otp,lrascao/otp,getong/otp,g-andrade/otp,uabboli/otp,mikpe/otp,potatosalad/otp,massemanet/otp,tuncer/otp,emacsmirror/erlang,dgud/otp,weisslj/otp,cobusc/otp,g-andrade/otp,isvilen/otp,erlang/otp,lrascao/otp,fenollp/otp,g-andrade/otp,bsmr-erlang/otp,potatosalad/otp,weisslj/otp,bsmr-erlang/otp,bjorng/otp,massemanet/otp,g-andrade/otp,mikpe/otp,vinoski/otp,tuncer/otp,falkevik/otp,bugs-erlang-org/otp,bernardd/otp,potatosalad/otp,electricimp/otp,emile/otp,rlipscombe/otp,vladdu/otp,dgud/otp,rlipscombe/otp,legoscia/otp,dumbbell/otp,bernardd/otp,getong/otp,matwey/otp,tuncer/otp,matwey/otp,uabboli/otp,dgud/otp,rlipscombe/otp,fenollp/otp,vladdu/otp,bjorng/otp,weisslj/otp,jj1bdx/otp,kvakvs/otp,g-andrade/otp,getong/otp,weisslj/otp,bugs-erlang-org/otp,erlang/otp,RoadRunnr/otp,neeraj9/otp,RaimoNiskanen/otp,psyeugenic/otp,vladdu/otp,electricimp/otp,ahmedshafeeq/otp,vinoski/otp,bugs-erlang-org/otp,tuncer/otp,legoscia/otp,kvakvs/otp,goertzenator/otp,kvakvs/otp,matwey/otp,emacsmirror/erlang,dumbbell/otp,psyeugenic/otp,psyeugenic/otp,electricimp/otp