Germany has started pulling out its troops from Afghanistan and handed over its command base in the northern province of Kunduz to the Afghan security forces.