Line multi labeling improved

Followup of PR #1338, adds support for multi-labeling polygon perimeters.

TBO b190546 is really one big hack, but after spending some time looking at the pal code, it looks like adding proper multi-labeling support there is not straight forward. So this seems the easiest solution. Comments welcome.

Referring to the "Merge connected lines to avoid duplicate labels" issue pointed out in #1338, is there an actual case where this is relevant when multi-labeling is enabled? Couldn't the merge connected lines setting just be ignored in this case?