Part 1 of terminal support fix

Changed the daemon to use pseudo-terminals closer to the way SSH or telnet does. Changes are extensive because the slave device was being opened by the wrong end of the connection, ie. the client is the one which should be opening the master ptmx device.

SIGWINCH is still not being handled. The next commit will attempt to address this.
Added SIGWINCH handling and better cleanup

Added a task to forward SIGWINCH from the client to the daemon via the
correct ioctl. Terminal window sizing now seems to work correctly.

Also added signal handler to catch signals which can cause the client to
terminate, allowing the client to restore stdin's termios. Previously,
killing the su client using (for example) SIGTERM would result in the
terminal being left in an unusable state.
Refactored pseudo-terminal code into pts.c
Undo a change which resulted in dangling FDs
Removed a hackish check for stdout in pump()
Made scoket protocol uniform

Also eliminated some control flow branches
Changed when the client sends pts-slave
Treat each standard I/O stream separately
Eliminated use of FIFOs, factored PTY proxy code

Instead of opening FIFOs, we now send the standard I/O descriptors
across the Unix socket.

Also, the I/O pumps were moved to pts.c
Add Lithuanian translations

Change-Id: Iad3e2f31cb2272c4215d96f99f61c8cf4c9f694f
Merge "Add Lithuanian translations" into cm-10.2
Add workaround for Samsung set*id restrictions (bug #196)
Don't use "am --user" unless multiuser mode is enabled (bug #204)
daemon: do not leak resources

Before this patch, the client was responsible for removing FIFOs before
connecting. That left a whole bunch of FIFOs in the SuperUser /dev/...
directory. After This patch, the daemon removes FIFOs as soon as the client is
connected. (This is detected by making the daemon read from the control socket.)

This patch becomes unnecessary when file descriptors can be passed though
processes.
Merge pull request #206 from Lekensteyn/fix-resource-leaks

daemon: do not leak resources
Don't use "am --user" unless multiuser mode is enabled (bug #204)
Merge remote-tracking branch 'koush/master' into cm-10.2
Update activity.c

another am invocation with unconditional --user (the last one on line 185 needs no condition as it is only called in multiuser mode)
Merge pull request #208 from h1618/patch-1

Update activity.c
assign user before use

sorry, jumped too short on my last commit: the user array has to be initialized before first use ...