German chancellor vows to stay in office despite AfD triumph in state election