Fix encoding of UTF-8 character cells

Prior to this fix, UTF-8 character cells had odd length and the first
character of the encoded string was unset. Example: Instead of

    [e280a6]

something like

    5[e280a6]

was added to the encoded line.

This incorrectly encoded line in turn put iTerm2 into an infinite loop
in function "dataForHistoryLine". More precisely, in the loop

    for (int i = 0; s[i]; ) { .. }

which has no termination clause, none of the conditionals that would
have incremented i matched.

This probably also fixes [iTerm2 issue 2302](http://code.google.com/p/iterm2/issues/detail?id=2302).