android: backport pty implementation from aosp/master

This is not (yet) in l-preview branch but on master
The only way to prevent duplicated includes was to
test the existence of a new constant added after
l-preview bionic source release.

Also use compatible hasmntopt() return type
(swapon/off compilation warnings)

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

Change-Id: I4ee6e7752eab84de4566ae86a90171b8241fcaea
Android.mk: toggle l-preview config flag

Change-Id: I4465b88a0337f5f267d501a94b2f71f8ef07b318
Fix remaining bionic warnings

Tested on arm and x86 (kitkat),
aosp/master has some other ones

Also update the readme and android.h

Change-Id: I170b16f2e091b99f971fb518bf0106c0e92adfdd
Test some tty related applets (getty, login, su)

And passwd, mkpasswd, cryptpw

Sample /etc/passwd required before 'passwd' :
root:x:0:0:root:/:/system/xbin/bash

busybox su allow to change current user, if you are root
Example : "busybox su shell -c /system/xbin/bash"

busybox su is not symlinked to prevent problems with
the optional su daemon

getpwXXX() return now an empty string instead of null,
busybox often check directly pw->pw_passwd[0]

PS: This commit was made to test applets on bionic,
and will maybe not be merged as-is later (new applets)

Change-Id: I96ee64f0872856fad6b3ff299faafad6451da556
cron: fix busybox folder config

config folder was badly set to debian style cron.d
but busybox variant is a bit different :

    mkdir /etc/crontabs
    echo "* * * * * log CRON!" > /etc/crontabs/`whoami`

    crond -f

Change-Id: I0b9af08a557a952b5074da3231f32433f447f558
Add script and scriptreplay applets

Usage :
/ # script -t /data/local/script.test 2>/data/local/script.timing
/ # scriptreplay /data/local/script.timing /data/local/script.test

Change-Id: I89deac5161f93278fc477b57632eb717947075cd
vi: try to insert utf8 at the right place

only check if we are inside an utf char for the moment

Change-Id: I60bbefcb1fa71e072a15c56985a53706ab53dc2e