making BuildHelper.getTransitiveDependencies method more flexible

This change will make method BuildHelper.getTransitiveDependencies() more flexible and also reduces code duplicating for.ex.:
for ( Artifact artifact : getTransitiveDependencyArtifacts() ) {
    if ( artifact.getType().equals( APKLIB ) || artifact.getType().equals( AAR ) ) { ... }
}

will be able to replace with next:
for ( Artifact artifact : getTransitiveDependencyArtifacts( APKLIB, AAR ) ) { ... }