A London court has thrown out a 145m euros (£126m) legal case brought by a former lover of the ex-king of Spain.