Manchester City were not always confident of keeping Pep Guardiola but these last few months have seen him decide to stay