Allen Simon’s sixth-floor apartment at 838 Fifth Avenue snagged a signed contract after seven years on and off the market.