Add "Term Here" send intent to open a terminal in a given directory.

This addition adds "Term here" to the "Send" or "Send to" option on many file managers,
accessable by a long press. Long-press a file or directory in a file manager and select
"Term here"; Term will open to a new window at that location.

The permission.RUN_SCRIPT permission is not used because no executables other than 'cd'
are invoked. Choosing "Term here" performs essentially the same action as merely opening
Term, but with the addition of the specified starting directory.

I chose to use the "send" intent option instead of a normal intent with 'data' because
I think showing "Term here" for every file you wish to open normally is excessive, so
for the special case where you want to open a terminal at a file or directory location
the "send" feature can be used.

It might be desired to later add a the ability to launch scripts from a file manager
by selecting the script, or other executable, and choosing "Term", or "Run with Term".
This would be implemented with a normal Intent which uses 'data' to communicate the file
and would be selected after a short-press in most or all file managers.

Original patch by Frank Westlake. Improved formatting, error checking,
and shell quoting by jackpal.

Tested in "ES File Explorer File Manager".
Avoid NPE due to null mAltBuffer

mAltBuffer is set to null in finish().
Update RemoteInterface.java

New Intent.data procedure for launching scripts.
RemoteInterface.java with new Intent.data procedure.
First implementation of shortcuts
FSNavigator: pause/resume, last directory. AndroidManifest: rename activity.
AddShortcut.jav
Shortcuts
Shortcut work
Add READ_EXTERNAL_STORAGE permission.
Added theme choice to FSNavigator.
TranscriptScreen: increase mTotalRows when resizing if needed

Currently, when you attempt to increase the number of screen rows in a
TranscriptScreen beyond the value of mTotalRows supplied when the
TranscriptScreen was initially created, the backing store allocated in
init() will not be large enough to hold the contents of the screen.
This results in strange behavior, such as duplicate lines or lines
overwriting each other in full-screen applications.

Fix this by bumping mTotalRows as needed when resizing.
TerminalEmulator: fix screen resizing when alternate buffer is in use

A full resize of the screen while the alternate buffer is current (e.g.
if GNU screen or another fullscreen terminal application is running)
can currently crash with the following stack trace:

java.lang.IllegalArgumentException
	at jackpal.androidterm.emulatorview.UnicodeTranscript.setChar(UnicodeTranscript.java:727)
	at jackpal.androidterm.emulatorview.UnicodeTranscript.setChar(UnicodeTranscript.java:714)
	at jackpal.androidterm.emulatorview.TranscriptScreen.set(TranscriptScreen.java:99)
	at jackpal.androidterm.emulatorview.TerminalEmulator.updateSize(TerminalEmulator.java:464)
	[...]

This happens because TerminalEmulator is trying to mark the position of
the cursor in the alternate buffer, but the alternate buffer was already
resized.  There's no guarantee that the current location of the cursor
is still a valid position on the resized screen, and if it isn't, the
exception above is thrown.

Even when the terminal doesn't crash, resizing the screen causes the
screen to blank briefly until the application redraws the screen, since
the contents of the alternate buffer are discarded during the resize.

To fix this, we note that when resizing the screen, we don't actually
need to care whether the main or alternate buffer is current -- we just
want to resize the current buffer (whichever one that is).  Therefore,
instead of treating the main and alternate buffers differently during
resizing, we just work with the active buffer.

In principle, we could defer the resizing of the inactive buffer until
it becomes current, but this introduces the possibility of latency at
some undetermined future time (when the buffers are swapped).  It's
probably better to do the work during the resize event itself, when the
user is more willing to tolerate a pause and there's usually an
animation to help disguise it.  (The alternate buffer has no scrollback,
so even a full resize will be relatively quick; therefore, the only case
where this could become noticeable is when the alternate buffer is
current, but the main buffer has a very long scrollback.)  We therefore
resize the inactive buffer immediately, taking some care to avoid
problems with cursor positioning (in particular, we can't trim blank
lines, because without the cursor position marking, we can't be sure
whether they're significant or not).
Merge branch 'steven676-for-upstream'
Merge pull request #316 from arstrube/read_sd

Add READ_EXTERNAL_STORAGE permission.
Merge branch 'master' of git://github.com/FrankWestlake/Android-Terminal-Emulator
Auto-linkification only match URLs that start with https?:

Fixes #319
Shortcuts pahse 2.
Correct icon mixup.
Shortcut changes