Add pipe2 and O_CLOEXEC to the libcore POSIX API.

@hide right now, but we should expose these at some point.

Bug: 18719692
Change-Id: I0a73606cf089ed307d1ab2916a7df28b3c45aaf0
Fix native registration.

I thought I'd tested my previous change but hadn't.

Change-Id: Ie121b571cc2f767dd4bbe10291a56fe31496e6cc
Fix poll to never return EINTR.

Bug: 18759467
Change-Id: Ia5b97a55318b5990ad6b80d15641223aa4fb06f5

Conflicts:
	luni/src/main/native/libcore_io_Posix.cpp
Don't TEMP_FAILURE_RETRY calls that can't fail.

It turns out that while GCC doesn't care, clang is unhappy with us
because it notices that we're comparing an unsigned value (like a uid_t)
against -1:

  libcore/luni/src/main/native/libcore_io_Posix.cpp:727:12: error: comparison
  of integers of different signs: 'typeof (getegid())' (aka 'unsigned int')
  and 'int' [-Werror,-Wsign-compare]
    return TEMP_FAILURE_RETRY(getegid());
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bug: 18759467
Change-Id: If71b11cbdd0cda2b8efcc1706eb49856c3770bb8
Update ByteBuffer positions in Posix.* functions.

Also add tests in libcore.io.OsTest and update (and simplify)
callers that were updating the position themselves.

bug: 18641009

(cherry picked from commit f3b61eaf1931ae8393e54202a717334a4971ebdf)

Change-Id: I8a810b2dfde7c13278807381bdfe7f532a3481a0