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.
allow object header size to be specified at build time

By default, the object header consists of a single pointer to the
class representing the type of that object and is thus exactly the
size of a native pointer on the target architecture.  This commit
allows additional space to be reserved in the header by changing
ObjectTagInBytes in constants.h.  The additional space can be accessed
with e.g. fieldAtOffset<uintptr_t>(instance, BytesPerWord).