End a paragraph the way TeX does (§816): drop any trailing glue, forbid a
break at the join with \penalty10000, then append \parfillskip. The
infinite stretch is what lets the final line be any length at all without
being reported as underfull.
Idempotent: a list that already ends this way is returned unchanged, so a caller that finishes its own paragraphs and one that does not both work.
Line breaking and glue setting.
model.ts's vocabulary is already exported above.