jni: Refresh discharges based on their lifetime instead of a constant
factor.

This requires adding the cache time to the discharge cache, which also
implies modifying the agent to transport this data in a backward
compatible way.

MultiPart: 2/3

Change-Id: I0cc0bdae18fbb26a92cfafead6513c04e9c81762
2 files changed