Use gradle model to build connection to workspace projects as this
handles setting jvm arguments, etc. correctly.  Also fixed caching when
resolving projects.