refactor: split up wrap_lines_smart
refactor: split up wrap_lines_smart

The 3 stages had no interdependencies besides text_info and using some
common variable names and names only. Split each stage into its own
function to make it a bit easier to understand and also rename
last_space to last_breakable.

libass/libass,astiob/libass,libass/libass,astiob/libass