Fix perf(1).

This is still a mess, but it's less of a mess and at least the perf basics
now work. I've also added a couple of TODOs (and raised an internal bug)
for one problem, and we have an existing internal bug for the strerror_r
problem, and I've raised a new internal bug for the fact that 'perfhost
report' doesn't seem to be able to read our symbols.

(cherry-pick of 708e65a9521667eeba62945e418deabc70423f52.)

Bug: 16705027
Change-Id: I6eb321162b48f0625901e5be5d7915db7294b8e3
Merge "Fix perf(1)."
Use 'cat' as perf's default pager on Android.

Upstream had 'less', so 'more' was a local change (even though we don't
have more either!), so just switching to cat for now doesn't diverge us
any more than we already were.

(cherry-pick of a5e2d07be6c6a1442b7eca78495b6a0afc25fb39.)

Bug: 16705027
Change-Id: I05c4a346be5e8f70cb6a7fa027c40d671ffe503f
Merge "Use 'cat' as perf's default pager on Android."
Fix perf(1) for aarch64 toolchains.

I've sent this upstream, but we need it now if we want "perfhost annotate"
to work for arm64.

(cherry-pick of d8fa3691c10ef2605bd87077c4157d40c64a187c.)

Bug: 16705027
Change-Id: I46750c10c4d2e8069f20f80022546aae417d350e
Merge "Fix perf(1) for aarch64 toolchains."
Sync with upstream perf-3.12.

Modulo a handful of changes (now marked with #if defined(ANDROID_PATCHES)),
this brings us in line with upstream kernel source. I'll look at adding
a GNU-style basename(3) to bionic and seeing if we can fix libelf to not
need <stdio_ext.h> (or add <stdio_ext.h>) and then come back to remove
more of the hacks.

I also got rid of a lot of the stuff that we can just get from our uapi
headers, rather than have a second copy here.

Change-Id: Ifcddea46708471c86ee6fee6f31295875c7308bb
Merge "Sync with upstream perf-3.12."
Use GNU basename(3) in perf(1) now bionic has it.

This brings us another step closer to upstream.

Bug: 11860789
Change-Id: I90fbcda69cd794b6dedbc38a56700ca4de73b7bd
Merge "Use GNU basename(3) in perf(1) now bionic has it."
Remove an elfutils-related hack from perf(1).

Change-Id: Icd5873f7f0a89daf1ca5fa3d5af2d090be050ab5
Merge "Remove an elfutils-related hack from perf(1)."
Disable clang due to missing __aeabi_read_tp.

BUG: 17167262
BUG: 16696563
Change-Id: I76ee72153f1072aca6d5188ecc09ed3f9b5d471f
Merge "Disable clang due to missing __aeabi_read_tp."