Approximate Message Passing with Spectral Initialization for Generalized Linear Models