Support for Java 8's java.util.Optional at injection points

Issue: SPR-11833