Move task selector processing to toolingApi provider.

1st step that processes passed TaskSelectors in provider code.
This still transfers a list of tasks there and back.
Move task selector processing to toolingApi provider.

Task selector is defined as task name, projectDir, projectPath now and this is
accessible from InternalLaunchable.
Release notes for Tooling API and related.
GRADLE-2983 Fixed IndexOutOfBoundsException error when finalizers are used.

Not sure if this is they way we want to fix it. Please review.
Added in-memory caching for module artifact set
Now that we cache module artifact sets, can fail when offline
Remove a few stale/obvious TODOs
REVIEW-4447: Don't mention changes to stuff that we don't consider 'public'
Optimize IdeaDependenciesProvider.

Evaluate only configurations that contain dependencies exported to IDEA.
REVIEW-4421: Don't require ModuleVersionMetaData for resolving artifacts

- This means that we don't need to hang onto all of the Module Descriptor instances after resolve
- Added ComponentIdentifier to ModuleVersionArtifactIdentifier
- Replaced ModuleVersionMetaData parameter on ArtifactResolver.resolveArtifact() 
  with a ModuleSource parameter
- Tidied up implementation of RepositoryChainArtifactResolver somewhat
Ensure that collection serializers retain order of entries
Return simpler Task from BuildInvocations model without Project reference.

This makes BuildInvocations model lighter but creates an API change.
improve ivy test fixtures

- handle ext attribute
- provide access to any ivy artifact
rename/move maven-specific artifact resolution test
add ivy-specific artifact resolution test
factor out maven candidate artifact computation into separate class
implement maven-style javadoc/sources artifact resolution for flatdir repositories
introduce SoftwareArtifact#getFailure

- Can't think of a good way not to have this method. I don't think it's worth it to have a separate model for failures.
expose any artifact resolution failures that occur while executing artifact resolution query
only try to set sources and javadoc jar files for ide dependencies if they were resolved successfully