Backport improve platform build script changes

 - Add support for building specific projects using --project
 - Improve the detection of which JDKs are required to build a project
   by also considering its runTestsWith configuration
 - Look in the right place for the platform bom properties file
Merge branch '1.0.x' into 1.1.x