properly unwrap Optionals in Resource methods

This PR unwraps optional-like types (Java `Optional<>` and Scala `Option[]`) inside Resource methods -- an improvement over failing through to `UNKNOWN[]`.

@fehguy

/cc #739 @wsorenson