Unifying AMP Algorithms for Rotationally-Invariant Models