This adds a secp256k1_scalar_pow which takes two scalars and returns pow(first, second) modulo the group order. It also adds wrappers in eckey and secp256k1 as secp256k1_ec_privkey_tweak_pow.
It should be helpful when using secp256k1 to calculate the jacobi symbol. Right now I believe you need GMP to do so otherwise.