Terry Ryan resigns as Twins GM