Move the implementation of JNIHelp.h's FileDescriptor helpers into JNIHelp.c.

These functions used to be declared in dalvik/ but defined in libcore/, which
was a layering violation but not important. It now stands in the way of
switching FileDescriptor's JNI over to C++, so out it goes.

There's a functional change here: the libcore code was going out of its way
to ensure that FileDescriptor's <clinit> was being invoked, but it's not
obvious that there was any reason for this: the static initializers just set
the err/in/out fields' descriptor fields to the appropriate integers.

A separate change rewrites FileDescriptor's JNI in terms of JNIHelp.h's API,
so it no longer needs to know anything about FileDescriptor itself. (Amusingly,
the original motivation for switching to C++ was to rewrite code that I've now
simply deleted.)

Change-Id: I5d79e5b91835183c21a6b7a1545178d9d93f4b69
2 files changed