Update the code generator and related classes in annotation processor to use the new WrapForJNI flags. Also add some more sanity checking to make sure the flags are used correctly.