Equivalent trim_all in bin split for <17.x
Equivalent trim_all in bin split for <17.x

The trim_all option used in binary:split/3 is not supported in 17.x.
This patch makes an equivalent operation by eliminating empty split
fragments. From the docs:

    trim
    Removes trailing empty parts of the result (as does trim in
    re:split/3.

    trim_all
    Removes all empty parts of the result.

The new expression is therefore equivalent to the old one, but with the
added benefit of compatibility.

Fixes #1275

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