After suffering a massive loss from a trading glitch last week, Knight Capital Group has signed a rescue agreement with investors worth $400 million.