beam_type: Refactor updating of the type database
beam_type: Refactor updating of the type database

The function tdb_update/2 is problematic. It does not distinguish
between assigning a register with a new value and updating information
about a register that is used a as source in a test instruction.

That was not a problem in practice when there were very few types,
but bugs started to be noticed as more types were added. (For example,
when a register was overwritten with a new value, the type for the
old value stored in the same register could linger in some cases.)

Introduce separate functions tdb_store/3 and tdb_meet/3 for assigning
a new value to a register and for updating type information for a
register referenced as as source, respectively. Also stricten
verification of the types that gets stored into the type database.

ferd/otp,vinoski/otp,potatosalad/otp,aboroska/otp,legoscia/otp,electricimp/otp,emacsmirror/erlang,potatosalad/otp,uabboli/otp,bjorng/otp,uabboli/otp,tuncer/otp,lrascao/otp,bsmr-erlang/otp,rlipscombe/otp,emacsmirror/erlang,ferd/otp,RoadRunnr/otp,fenollp/otp,uabboli/otp,mikpe/otp,isvilen/otp,jj1bdx/otp,RoadRunnr/otp,mikpe/otp,bjorng/otp,erlang/otp,potatosalad/otp,emacsmirror/erlang,aboroska/otp,cobusc/otp,getong/otp,kvakvs/otp,bjorng/otp,fenollp/otp,bsmr-erlang/otp,uabboli/otp,dgud/otp,mikpe/otp,tuncer/otp,g-andrade/otp,aboroska/otp,fenollp/otp,mikpe/otp,mikpe/otp,aboroska/otp,kvakvs/otp,erlang/otp,legoscia/otp,rlipscombe/otp,electricimp/otp,saleyn/otp,mikpe/otp,ferd/otp,electricimp/otp,bjorng/otp,tuncer/otp,bsmr-erlang/otp,vladdu/otp,getong/otp,dumbbell/otp,vladdu/otp,vladdu/otp,fenollp/otp,g-andrade/otp,electricimp/otp,g-andrade/otp,kvakvs/otp,dumbbell/otp,dgud/otp,jj1bdx/otp,fenollp/otp,rlipscombe/otp,jj1bdx/otp,tuncer/otp,vinoski/otp,vladdu/otp,legoscia/otp,tuncer/otp,dumbbell/otp,RaimoNiskanen/otp,jj1bdx/otp,g-andrade/otp,bjorng/otp,RaimoNiskanen/otp,aboroska/otp,uabboli/otp,dgud/otp,RaimoNiskanen/otp,aboroska/otp,bsmr-erlang/otp,bjorng/otp,electricimp/otp,dgud/otp,bsmr-erlang/otp,dgud/otp,fenollp/otp,electricimp/otp,lrascao/otp,bjorng/otp,electricimp/otp,saleyn/otp,saleyn/otp,potatosalad/otp,emacsmirror/erlang,dumbbell/otp,dgud/otp,dumbbell/otp,erlang/otp,RaimoNiskanen/otp,uabboli/otp,jj1bdx/otp,getong/otp,tuncer/otp,isvilen/otp,vladdu/otp,saleyn/otp,isvilen/otp,jj1bdx/otp,uabboli/otp,potatosalad/otp,lrascao/otp,tuncer/otp,isvilen/otp,RoadRunnr/otp,isvilen/otp,isvilen/otp,lrascao/otp,bsmr-erlang/otp,cobusc/otp,vladdu/otp,electricimp/otp,RoadRunnr/otp,lrascao/otp,kvakvs/otp,mikpe/otp,isvilen/otp,legoscia/otp,rlipscombe/otp,erlang/otp,cobusc/otp,dumbbell/otp,rlipscombe/otp,aboroska/otp,legoscia/otp,cobusc/otp,potatosalad/otp,rlipscombe/otp,cobusc/otp,dgud/otp,lrascao/otp,vinoski/otp,getong/otp,dgud/otp,dumbbell/otp,emacsmirror/erlang,lrascao/otp,erlang/otp,saleyn/otp,emacsmirror/erlang,uabboli/otp,mikpe/otp,erlang/otp,vinoski/otp,lrascao/otp,saleyn/otp,saleyn/otp,bjorng/otp,emacsmirror/erlang,RaimoNiskanen/otp,g-andrade/otp,jj1bdx/otp,rlipscombe/otp,RoadRunnr/otp,rlipscombe/otp,electricimp/otp,RaimoNiskanen/otp,ferd/otp,potatosalad/otp,mikpe/otp,dumbbell/otp,emacsmirror/erlang,getong/otp,getong/otp,ferd/otp,potatosalad/otp,vinoski/otp,RaimoNiskanen/otp,cobusc/otp,erlang/otp,saleyn/otp,potatosalad/otp,vinoski/otp,bjorng/otp,kvakvs/otp,getong/otp,fenollp/otp,RoadRunnr/otp,isvilen/otp,g-andrade/otp,aboroska/otp,fenollp/otp,g-andrade/otp,kvakvs/otp,jj1bdx/otp,bsmr-erlang/otp,bsmr-erlang/otp,RaimoNiskanen/otp,g-andrade/otp,getong/otp,vinoski/otp,dgud/otp,dumbbell/otp,kvakvs/otp,erlang/otp,bjorng/otp,legoscia/otp,emacsmirror/erlang,getong/otp,g-andrade/otp,emacsmirror/erlang,cobusc/otp,legoscia/otp,uabboli/otp,isvilen/otp,ferd/otp,saleyn/otp,erlang/otp,potatosalad/otp,vladdu/otp,lrascao/otp,ferd/otp,vladdu/otp,RoadRunnr/otp,kvakvs/otp,vinoski/otp,erlang/otp,vinoski/otp,ferd/otp,RoadRunnr/otp,kvakvs/otp,aboroska/otp,vladdu/otp,legoscia/otp,bsmr-erlang/otp,mikpe/otp,fenollp/otp,g-andrade/otp,tuncer/otp,legoscia/otp,tuncer/otp,vinoski/otp,jj1bdx/otp,RaimoNiskanen/otp,isvilen/otp,rlipscombe/otp,getong/otp,ferd/otp,dumbbell/otp,jj1bdx/otp,dgud/otp,RoadRunnr/otp,cobusc/otp,rlipscombe/otp