fix to listbox bug reported by kenny

accidentally broke this when implementing the listbox:select method and rewriting click to use it.
tweak
added canvas library

library to create render targets that have with the full set of
functions expected on gpu, plus a draw(target,x,y) method that can be
used to draw the contents of the canvas to another render target (either
a gpu or another canvas).  Rendering to these happens purely in memory,
making it very fast, and it compiles the longest possible strings it
can, called in code "spans," of consecutive characters sharing a color
before drawing up to the parent. This is not optimal for drawing to
other canvases, but is near-optimal for drawing to an actual gpu.

One possible optimization left: it may be worth the cycles, in the case
of the gpu, to use target.get for the entire area, trimming or skipping
spans that contain the same data as the screen. If this is added,
DEFINITELY must detect and handle canvas targets differently, as this
would be even more inefficient for drawing to another canvas, where the
get function is more expensive than the gpu's get function.
canvas tweak, wasn't using parent properly
I forget you can do this in lua.
fix var name mismatch caught by symmetryc
series of minor fixes to the savedlg example

was listing directories in reverse order, also using unnecessary
nextFile variable to add files at end. Also check for and append missing
final / to directory names, to normalize view.
untested yet, just commit before bed

buffer implemented but needs testing and no doubt extensive bug-fixing
of the critical "you called this finished?!" variety.

The changes to canvas need testing, too.
bugfixes and tweaks related to 1bit (tier 1) gpu

fixed bug in centering for max-sized guis, added style properties for
1bit that make everything usable, if not pretty
fixed bug in canvas and got buffer tested & fixd

gfxbuffer still needs more thorough testing, but it generally seems to
work with adding, merging, and splitting spans for all cases I could
think of off the top of my head.
added draw method to gui objects
gml now uses a gfxbuffer to buffer drawing

may still be some glitches with this, but at a glance savedlg and
gmltest both appear to work properly.
tweak to timing of final buffer flush in cleanup
derp bug fix in gui:draw
buffer wasn't flushing current color properly