Scholz takes over as German chancellor, ending Merkel era