ATR-21609, adapting merging to allow for empty steps in parallel merging
Just a bit of functionality to allow for the steps supplied by signatures to combined chains to be truly empty.
(1) check if all legs are in an empty step/sequence at in a step - if so, remove any empty sequences and create an empty step instead
(2) check if an empty step supplied needs to be merged with a non-empty step. If so, create an empty sequence.