Manchester City survived an early scare to see off Borussia Dortmund and reach the Champions League semi-finals for the first time under Pep Guardiola.