Germany win Olympic women's football gold for the first time with a 2-1 victory over Sweden in the final in Rio.