Refactor session and widget code into separate library project

We'd like to make the terminal emulator and view reusable by others, so
separate out this code (primarily TermSession, TerminalEmulator,
TranscriptScreen, EmulatorView, and associated classes) into a library
usable by other projects.  Users of the new library are expected to
instantiate (or subclass) TermSession, connect it to the emulation
client via an InputStream and OutputStream, and then attach it to an
EmulatorView, which will display the terminal screen and scrollback.

In the app, we subclass both TermSession (ShellTermSession) and
EmulatorView (TermView) to consolidate the setting and updating of
preferences in one place.  Since tty-related handling stays in the app
(there's no guarantee library users will be using a tty), we also
override various methods of TermSession to handle our tty functionality.
Allow EmulatorView to be instantiated through XML layout inflation

The XML layout inflater needs constructors that take an AttributeSet
parameter, so add these constructors and provide a public method to
attach a TermSession for when these constructors are used.
Make library internals package-private

Many of the classes, fields, and methods in the library don't need to be
exposed to users.  Make them package-private or private.

To accommodate the changing of TerminalEmulator to package-private, we
need to add a method to TermSession to allow writing directly to the
TerminalEmulator input.  Do this and convert the existing user of this
functionality.
Remove superfluous EmulatorView.resetTerminal() method

Presumably this is a vestige of the days when EmulatorView was coupled
to the Term activity.  Superseded by TermSession.reset() and now has no
users.
Style fix
Add script to regenerate the JavaDoc docs from the source
Document the library API with JavaDoc
Add generated JavaDoc HTML documentation for the library
Set/clear UTF-8 input flag on tty as appropriate

The Linux (>= 2.6.4) terminal driver uses the IUTF8 flag for
termios.c_iflag to implement correct character erase behavior in cooked
mode.  Set the flag when entering UTF-8 mode, and clear it when leaving
it.
Allow external packages to modify PATH by responding to broadcasts

One of the most frequently-requested features in Android Terminal
Emulator is an easy way to install additional command-line tools beyond
the limited set that Android offers by default.

We accomplish this goal here by sending out ordered broadcasts when
we're first started (in onCreate()), asking for external packages to
provided additional directories to be added to the user's PATH.  This
allows Market packages to make commands available to ATE users by
implementing a BroadcastReceiver which will respond to the broadcast
with the directory it's installed its tools in.

We send out two broadcasts with two different actions:

* jackpal.androidterm.broadcast.APPEND_TO_PATH requests directories to
  be appended to the user's PATH.  No special permissions are required
  to receive this broadcast.
* jackpal.androidterm.broadcast.PREPEND_TO_PATH requests directories to
  be prepended to the user's PATH.  This is intended to allow BusyBox
  installers to override system-installed commands, and is therefore
  protected by a new permission,
  jackpal.androidterm.permission.PREPEND_TO_PATH.

In addition, two new preferences are added to allow the user to disable
all PATH extensions, or just PATH prepending.
Add sample receiver for PATH broadcasts
Require permission to append to PATH as well

As requested by Jack in #45:

    I can see two potential security issues with appending:

    1) It could change the behavior of existing scripts that check to
    see whether specific commands exist or not.

    2) A nefarious program could "typo squat", by registering common
    mis-spellings of system commands.
Update EmulatorView library JavaDoc HTML docs
Merge pull request #112 from steven676/for-upstream

Widget library and path broadcasts