fix perf regression in calls to jl_array_ptr
fix #2915, BigInt memory leak