jni: security: Add API for notification of changes to the default blessings.

BlessingStore.Default is a somewhat weird function - it says "default"
but practically it is meant for use by servers to reveal blessings to
clients when they don't have any other information about the client.

There seems to be a desire to allow servers to change the blessings they
identify themselves with dynamically (for example, syncbase servers
might want to identify themselves as delegates of all the applications
whose data they are hosting - which changes as new apps connect to it).

Two possible ways of achieving this:
(1) Servers continue to use BlessingStore.Default with an added API
to allow them to be notified of changes to this.
This is what is implemented in this commit
OR
(2) Drop BlessingStore.Default as an API completely and have an
explicit v.io/v23/rpc.Server.SetBlessings method that sets the
blessings used by the server.

I'm a bit torn as to which of these two alternatives is more
appropriate, but it seems that there is a leaning towards this one
since it keeps the BlessingStore as the one place to persist blessings.

One subtlety related to this approach - I haven't figured out
how to return a useful channel in the un-cached agent case
(see changes to v.io/x/ref/services/agent/agentlib/client.go).
But that may not be a practical concern?

Another TODO: Figure out the notification API in Java

MultiPart: 2/5

Change-Id: I43e5352de230d6c63867ecf2c1188aa42ef47880
diff --git a/v23/security/jni.go b/v23/security/jni.go
index b6868e6..51c182d 100644
--- a/v23/security/jni.go
+++ b/v23/security/jni.go
@@ -724,7 +724,7 @@
 //export Java_io_v_v23_security_BlessingStoreImpl_nativeDefaultBlessings
 func Java_io_v_v23_security_BlessingStoreImpl_nativeDefaultBlessings(jenv *C.JNIEnv, jBlessingStoreImpl C.jobject, goPtr C.jlong) C.jobject {
 	env := jutil.Env(uintptr(unsafe.Pointer(jenv)))
-	blessings := (*(*security.BlessingStore)(jutil.NativePtr(goPtr))).Default()
+	blessings, _ := (*(*security.BlessingStore)(jutil.NativePtr(goPtr))).Default()
 	jBlessings, err := JavaBlessings(env, blessings)
 	if err != nil {
 		jutil.JThrowV(env, err)
diff --git a/v23/security/store.go b/v23/security/store.go
index bb24fab..4dc8e08 100644
--- a/v23/security/store.go
+++ b/v23/security/store.go
@@ -106,20 +106,21 @@
 	return jutil.CallVoidMethod(env, s.jBlessingStore, "setDefaultBlessings", []jutil.Sign{blessingsSign}, jBlessings)
 }
 
-func (s *blessingStore) Default() security.Blessings {
+func (s *blessingStore) Default() (security.Blessings, <-chan struct{}) {
 	env, freeFunc := jutil.GetEnv()
 	defer freeFunc()
+	// TODO(ashankar,spetrovic): Figure out notification API in Java
 	jBlessings, err := jutil.CallObjectMethod(env, s.jBlessingStore, "defaultBlessings", nil, blessingsSign)
 	if err != nil {
 		log.Printf("Couldn't call Java defaultBlessings method: %v", err)
-		return security.Blessings{}
+		return security.Blessings{}, nil
 	}
 	blessings, err := GoBlessings(env, jBlessings)
 	if err != nil {
 		log.Printf("Couldn't convert Java Blessings to Go Blessings: %v", err)
-		return security.Blessings{}
+		return security.Blessings{}, nil
 	}
-	return blessings
+	return blessings, nil
 }
 
 func (s *blessingStore) PublicKey() security.PublicKey {