JNI: fix use sig array
Summary: This is a backport of secp256k1 PR583
Test Plan: I don't have a good setup to test the java code, so I'll trust CI on that one.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D5353