F1 boss Bernie Ecclestone will pay a $100m (£60m) settlement to German authorities to end his bribery trial.