deal with complex encoding patters during collapsing

@jeremy @mikel @bf4 

a line like `encodedX encoded` was previously considered 1 encoded word -> errors

also speccing out collapse_adjacent_encodings since I found a few scenarios that were not covered by any tests