Added native method for calculating image averages (now if we have 128 sections, it'll run about the same speed.  Fixed minor JNI call bugs as well.