The transaction — the first rescue of a global bank since the financial crisis of 2008 — grants enormous clout to UBS, ridding it of its main rival.