Fix EXPERIMENTAL_USE_OPENJDK9=true build.

There are currently three different versions of some java.lang.invoke.*
classes used during compilation / while building java_system_modules:

 1.) Manually curated stubs from:
     libcore/ojluni/src/lambda/java/java/lang/invoke/
 2.) Automatically generated stubs from core-platform-api-stubs.
 3.) The full implementation classes from
     libcore/ojluni/src/main/java/java/lang/invoke/

The manually curated stubs in 2.) are not complete, for example
CallSite.java is missing the package private CallSite(MethodType)
constructor and therefore gets a default (public no-arg) constructor
instead.

Mixing any two of these breaks compilation of java_system_modules targets:

 * core-platform-api-stubs-system-modules broke because it combined
   1.) and 2.).
 * core-system-modules broke because it combined 1.) and 3.).

The classes from 1.) were included as part of core-lambda-stubs;
including them is inappropriate because the other classes in the
system_modules are a different kind of stubs (2., used in
core-platform-api-stubs-system-modules) or aren't stubs (3., used in
core-system-modules).

This CL fixes that by letting these system modules depend on a new
target core-lambda-stubs-for-system-modules, which omits the classes 1.).
This means that the system-modules only contain the version of these
classes from 2.) or 3.), as appropriate.

Bug: 118100586
Test: EXPERIMENTAL_USE_OPENJDK9=true make core-platform-api-stubs-system-modules
Test: Cherry-picked into internal branch and ran:
      EXPERIMENTAL_USE_OPENJDK9=true make checkbuild docs
      This command failed, but only at a late step and the
      corresponding failure (ran out of space on a filesystem
      in the image) is already happening prior to this CL.

Change-Id: I35e8d0b629dd1033afe50e4e674a09c1a16cd029
2 files changed