StableSSM: Alleviating the Curse of Memory in State-space Models through Stable Reparameterization