v3_codegen: Optimize matching of the final size-less binary segment
v3_codegen: Optimize matching of the final size-less binary segment

Consider the following function:

  f(Bin, Bool) ->
      case Bin of
	<<Val:16/binary,_/binary>> when Bool ->
	  Val
      end.

Simplified, the generated code looks like:

    bs_start_match2 Fail Live Bin => Bin
    bs_get_integer2 Fail Live Bin size=Sz  unit=1 => Val
    bs_skip_bits2   Fail      Bin size=all unit=8
    is_eq_exact Fail Bool true

The code generator will replace the bs_skip_bits2 instruction with
a bs_test_unit instruction if it can be clearly seen that the
context register will not be used again. In this case, it is not
obvious without looking at the code at the Fail label.

However, it turns out that bs_test_unit instruction is always
safe beacuse of the way v3_kernel compiles pattern matching.
It doesn't matter whether the match context will be used again.
If it will be used again, the position in it will *not* be used.
Instead, a bs_restore2 instruction will restore one of the saved
instructions.

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