StringToUTF16: Actually observe input and output widths correctly.

I must have read over the "size, in wide characters" part. This becomes a problem once you only convert a part of the input string, which we haven't needed up to now.
TextOutU/GetTextExtentPoint32U: Clear out the wchar_t buffer before writing.

This correctly terminates the resulting string in any case. :)
Cleanup.
Add json_array_set_expand.
thcrap_tsa: Add a TextOut hook with a parser for special tabstop and alignment syntax.
Change the layout markup parameter delimiter to '$'.

Whoops, I completely forgot that MediaWiki already uses '|' for template syntax. <...$> seems fairly uncommon, so let's go for that instead.
Fixes and improvements for the text layout parser.

* Now interprets every character of the cmd string as a layout command
* Tabstops are now relative to orig_x (small cosmetic improvement since Touhou draws shadows)
* Distinguish between the length of the *rendered* string and the length of the *consumed* string
Add bold and italic font markup.

Of course, we could pre-generate bold, italic and bold-italic fonts once we're doing #19, but I guess it's not worth the effort.
Bump version number to 2013-08-05