Ermedin Demirović scored twice as VfB Stuttgart continued their quest for a top-four finish with a battling win over Cologne.