Fixes #1711 and #1704. Cached resolution fixes

## fix for #1711 

Cached resolution flattens external dependencies coming from subproject dependencies.
That process needs to ignore non-compile configurations, otherwise I'd end up with test dependencies from subprojects.

## fix for #1704 

Exclude rules at the project level (using `ivyXML`) are now ported over to artificial graph so it's respected.