Fix JNI argv parsing: throw exception on NULL

Add new 'jni' test case to ensure this works
Fix bug in cli_uint()
Add 'sid:' field to output of "reverse lookup"

Use sid_t in more places