refactor(ivy): ngcc - only try to process the necessary properties (#32052)
refactor(ivy): ngcc - only try to process the necessary properties (#32052)

This change basically moves some checks to happen up front and ensures
we don't try to process any more properties than we absolutely need.
(The properties would not be processed before either, but we would
consider them, before finding out that they have already been processed
or that they do not exist in the entry-point's `package.json`.)

This change should make no difference in the work done by `ngcc`, but it
transforms the code in a way that makes the actual work known earlier,
thus making it easier to parallelize the processing of each property in
the future.

PR Close #32052

ocombe/angular,alxhub/angular,mhevery/angular,mprobst/angular,wKoza/angular,Brocco/angular,alexeagle/angular,Toxicable/angular,manekinekko/angular,matsko/angular,snaptech/angular,ocombe/angular,mhevery/angular,blesh/angular,brandonroberts/angular,matsko/angular,sarunint/angular,Toxicable/angular,mgechev/angular,IdeaBlade/angular,blesh/angular,sarunint/angular,manekinekko/angular,angular-indonesia/angular,brandonroberts/angular,shairez/angular,manekinekko/angular,shairez/angular,JiaLiPassion/angular,gdi2290/angular,matsko/angular,matsko/angular,wKoza/angular,JiaLiPassion/angular,JiaLiPassion/angular,mhevery/angular,Toxicable/angular,gdi2290/angular,StephenFluin/angular,filipesilva/angular,snaptech/angular,gdi2290/angular,alxhub/angular,filipesilva/angular,gnomeontherun/angular,gkalpak/angular,ocombe/angular,mhevery/angular,manekinekko/angular,blesh/angular,Brocco/angular,matsko/angular,mgechev/angular,snaptech/angular,shairez/angular,angular-indonesia/angular,wKoza/angular,Toxicable/angular,Brocco/angular,mprobst/angular,IdeaBlade/angular,Brocco/angular,Toxicable/angular,angular/angular,gkalpak/angular,gkalpak/angular,alxhub/angular,wKoza/angular,StephenFluin/angular,IdeaBlade/angular,alexeagle/angular,sarunint/angular,filipesilva/angular,wKoza/angular,shairez/angular,brandonroberts/angular,Brocco/angular,alexeagle/angular,mprobst/angular,ocombe/angular,filipesilva/angular,ocombe/angular,IdeaBlade/angular,gnomeontherun/angular,vikerman/angular,mprobst/angular,alexeagle/angular,vikerman/angular,StephenFluin/angular,mprobst/angular,manekinekko/angular,vikerman/angular,manekinekko/angular,filipesilva/angular,mgechev/angular,alxhub/angular,wKoza/angular,gkalpak/angular,brandonroberts/angular,Brocco/angular,angular/angular,snaptech/angular,alexeagle/angular,sarunint/angular,gdi2290/angular,JiaLiPassion/angular,angular-indonesia/angular,blesh/angular,gdi2290/angular,snaptech/angular,mgechev/angular,mhevery/angular,snaptech/angular,StephenFluin/angular,blesh/angular,vikerman/angular,shairez/angular,mhevery/angular,vikerman/angular,vikerman/angular,mgechev/angular,ocombe/angular,gdi2290/angular,alexeagle/angular,alxhub/angular,IdeaBlade/angular,gnomeontherun/angular,Toxicable/angular,angular-indonesia/angular,mprobst/angular,angular/angular,StephenFluin/angular,brandonroberts/angular,sarunint/angular,angular/angular,brandonroberts/angular,gnomeontherun/angular,sarunint/angular