add Value<T> convenience wrapper

for working around Java’s requirement that closures only reference
final variables in the outer scope.