win/lineprinter: Use a vector instead of manual memory management.

No behavior change. Based on a patch from gmisocpp@gmail.com!
Actually: `i` is compared to `to_print.size()` on the next line, so I have to either cast `i` here or `to_print.size()` below, and this seemed ever so slightly nicer.