Remove all the usages of depricated apis

remove depricated apis to sync up with atom-community/autocomplete-plus/pull/155