Implement <pty.h>.

Based on the package/apps/Terminal implementation. I'll switch them over
shortly. This also lets us build the toybox version of netcat.

Change-Id: Ia922a100141a67409264b43b937eeca07b21f344
linker: restore prelink support

Prelink support is required to load old vendor binary blobs
on many devices properly

This commit partially reverts 4688279db5dcc4004941e7f133c4a1c3617d842c

bionic: linker: fix prelink support

load_bias_ needs to be calculated from the min_vaddr, not the
prelink address

Fixes

couldn't map "libraryname.so" segment 1: Invalid argument

Change-Id: Iee5325e048daee78e8dcaa47c87454b908c89b4e
Revert "Revert "Reenable support for non-PIE executables""

* Conditionally revert under TARGET_NEEDS_NON_PIE_SUPPORT flag

This reverts commit 76e289c026f11126fc88841b3019fd5bb419bb67.

Change-Id: I0c64f219c488f5a507b4e0d651b46f71d1c6b5be