Change to jint and jlong as appropreate and change symantics of NewObject

This is because long on arm is only 32bits. Due to the variadic nature of
NewObject and the Call*Method routines, they can get confused if types are the
wrong size.