[PM] Make InvalidateAllAnalysesPass Optional (#196956)
Similar reasoning to 221a24e94f7b03ea881df34cc8867c58ac8fdb52. Making
this required means we end up with assertion failures in the LPM around
LCSSA.
This is a bit unfortunate given it would be nice to ensure we can
trivially invalidate analyses on optnone functions, but this matches the
old behavior and prevents and assertion failure for now.