code rearrangment to improve state of Android libcore tests

This mainly moves several sun.misc.Unsafe method implementations from
classpath-openjdk.cpp to builtin.cpp so that the Avian and Android
builds can use them.

It also replaces FinalizerReference.finalizeAllEnqueued with a no-op,
since the real implementations assumes too much about how the VM
handles (or delegates) finalization.
Merge pull request #55 from jentfoo/master

Added more to the avian classpath for the collection interface as well as the list interface
do not clear interrupted flag in Unsafe.park

Since park does not throw InterruptedException, we must leave the flag
set if we are interrupted while parked so that
e.g. AbstractQueuedSynchronizer can itself throw an exception if
appropriate.
only initialize class when necessary to avoid deadlock

Previously, we would attempt to initialize a class (e.g. call its
static initializer) whenever a method in that class was called, as
well as in any of the cases listed in
http://docs.oracle.com/javase/specs/jls/se7/html/jls-12.html#jls-12.4.

However, the above approach may lead to deadlock in an app which
relies on being able to call non-static methods in parallel with a
static initializer invocation in the same class.  Thus, this commit
ensures that we initialize classes only in the cases defined by the
standard.
fix OpenJDK build regression due to recent Android classpath refactoring
implement Unsafe.{put|get}Char
add support for the RuntimeVisibleParameterAnnotations attribute
Merge remote-tracking branch 'origin/master'
add stub implementation of JVM_CurrentClassLoader
don't load libmawt ahead of time when starting the VM

At one point, loading libmawt ahead of time was necessary to make AWT
work, but recent versions of OpenJDK seem to take care this from Java
code, in which case loading it ahead of time causes trouble, so we
comment it out for now until we exactly when it's needed.
provide stub for JVM_UnloadLibrary

It may leak file handles under certain circumstances to do nothing in
JVM_UnloadLibrary, but, for now, an empty implementation is more
useful than one that aborts the process.
filter flags argument to JVM_Open

The class library may pass non-standard flags to JVM_Open which will
confuse the OS if we pass them through, so we must filter them out.
initialize the class if necessary when the "new" operator is invoked

This is one of the conditions specified in
http://docs.oracle.com/javase/specs/jls/se7/html/jls-12.html#jls-12.4.1,
which I had forgotten about.
wait until all non-daemon threads exit before invoking the class library shutdown method

Running the shutdown method prematurely can cause deadlock in
OpenJDK's AWT implementation and may have other nasty effects besides
that.
fix sun.misc.Unsafe.arrayIndexScale implementation

The original implementation was based on the assumption that the
passed class would be the array element type, whereas it is actually
the array type itself.
perform any necessary argument conversion in JVM_NewInstanceFromConstructor

We must use the same utility function as JVM_InvokeMethod to ensure
that primitive arguments are unboxed when necessary.
Make exception messages match the ones from OpenJDK/Android

This commit changes the exception message format of
ClassCastException and CloneNotSupportedException.
remove unecessary PROTECT statements

Since there's no possibility of garbage collection during the
lifetimes of these local variables, there's no need to protect the
references.
Use native windows APIs for File.exists()

On windows, there are obscure cases where _wstat can return non-zero for a path that
actually exists, but the native GetFileAttributes returns valid attributes.  This is
the case in particular when the user or process doesn't have permissions to access
the directory (for instance, anything outside of %temp%\Low, when running as a
low-integrity process).

This was causing problems with .mkdirs() - which first tries to check if the parent
exists, and creates it if it doesn't. In our particular case, the exists() was
returning false for the parent, even though it exists, and .mkdir() works fine,
mkdirs() fails for the same directory.
force unicode support in java-io.cpp when including windows.h