Make blank lines track the current foreground/background color.

This fixes emulation errors related to scrolling with a non-default
background color.
A test program to help debug issue 149.
TranscriptScreen: guard against null rowColorBuffer when getting transcript

This occurs, for instance, when we try to retrieve text from the
transcript without caring about color information.  Fixes crash when
selecting/copying text introduced by 54d2530... ("Make blank lines track
the current foreground/background color.").
Fix inserting wide char into column previously occupied by normal-width char

Since an East Asian wide character takes two screen columns, if we're
inserting one into a spot previously occupied by a normal-width
character, we need to overwrite the contents of the column to the right
of the position into which the character is inserted.  We do this
shifting the contents of the rest of the line left in the array, then
updating our idea of the storage used -- or at least that's what's
supposed to happen.

There are at least two problems with the current implementation:

(1) findStartOfColumn() is used in a few places to get the spot in the
array where a column starts, but this relies on the offset array, which
is potentially out of date at this point.  Fix this by adding the shift
(which will be used to update the offset array later) to the value
whenever we use findStartOfColumn().
(2) When truncating the line by reducing the storage used count, we
currently effectively reduce the count by the size of the last column in
the line, which is not necessarily the same as the size of the
overwritten column.  We should instead adjust by the size of the
just-overwritten column (which is readily available to us at this
point).

Fixes #145, and potentially a class of other difficult-to-reproduce bugs
involving East Asian wide character support.
Fix rendering of non-BMP characters at start or end of text run

We currently discover a non-BMP character at the start or end of a
text run only after we process both halves of the surrogate pair
representing the character individually, resulting in off-by-one errors
in calculating the portion of the char array containing the run to be
drawn (we erroneously omit any high surrogate at the start of a run, and
erroneously include any high surrogate immediately following the end of
a run).

Fix this by processing both halves of the surrogate pair immediately
when we see the high surrogate.
Add brief demo file containing non-BMP characters

Contains a handful of characters from the Supplementary Multilingual
Plane (some musical and mathematical symbols, since I don't know any of
the other scripts in the SMP).
Merge pull request #161 from steven676/for-upstream

Miscellaneous bug fixes
Add a default LD_LIBRARY_PATH to the initial command string.
Remove initial default command.

I think for most users of Android Terminal emulator the default initial
command (which adds /data/local/bin to the path) was not useful,
because the directory /data/local/bin does not exist by default.

The /data/local directory is special because its permissions are set
so that it can be written to by the Android shell even on non-rooted
phones.

Therefore, it is possible for users of non-rooted phones to create the
/data/local/bin directory, and then put executables into that dir,
and then add it to their path, and then execute them as shell commands.

But, in reality, most people who would go to the trouble of installing
command-line applications tend to root their phone and set their
phone up more like a normal Linux system.

So there were very few people (possibly none) for which the default
initial command string was useful.
Added new strings.
Add testcases for TermKeyListener.

This change attempts full code coverage. However the Fn key
functionality cannot be reached by my emulator version. All the tests
with Function key fail.
Add Alt key behavior option to the preferences screen.

This will allow the user to choose whether she wants to keep the old
behavior or send a esc character before the string.
Make it possible to test the allowToggle mode.
Honor the AltSendsEsc flag.
Tweaks to Alt-sends-esc

+ Move to the Keyboard section of preferences.
+ On by default. (and now we actually honor the default.)
+ Rework preference text to make it clearer.
+ Rename string resource id names to make their role clearer.

+ Add support for setting the high bit instead of sending ESC.
   - I think there are more people who want this than the
     original composing logic.

+ Treat the Meta key the same way as the Alt key.
  - I considered having this be a separate preference, but
    there's a flaw: Some keyboards such as the popular
    Hacker's keyboard have a key labeled "Alt" that actually
    reports as "Meta" in software.

    So let's treat both Alt and Meta the same for now.

+ Make this code work on Android SDK 11+ physical keyboards

Android SDK 11+ physical keyboards are "chording" as opposed to
"toggling". Therefore we have to handle the !allowToggle case.

Also, the Meta flags can come in as a combination of
3 bits, so to mask them off we need to mask with META_ALT_MASK
rather than just META_ALT_ON.
Merge pull request #163 from gLes/master

Added new strings.
Handle alt-sends-ESC in IME too.

This patch handles the alt sends ESC in IME mode by routing the key event
through the onKeyDown() and onKeyUp() methods if Alt pressed and
the alt-sends-ESC mode is enabled.