(#647) Expand graphics before wrapping lines.
(#647) Handle line wrapping edge cases Vty's drawText function.
(#647) Decompose `lines'` into smaller functions.

Then apply in order:
 * expand graphics
 * split lines
 * then append spaces on lines that are not 0 modulo window width.

Also, don't special-case the newline character in expandGraphic since different
application order when using it and lines' will avoid expanding newlines.
(MAINT) Remove line break for readability.
(#647) Handle cursor positioning edge cases in SimpleLayout

Signed-off-by: Wayne Warren <waynr@sdf.org>
(#647) Ensure EOF cursor behavior remains the same.