Definition of an amide
The latter amide definition in you question did not evolve from the former name of organic amides, but the process was rather opposite, or at least they have a common root. The name "amide" appears to be quite old. There is even a notion of amidogen, not used very often today, but it appears in the book Elements of Chemistry from 1840, along with some inorganic amides like "amide of potassium" or "amide of mercury". Later book Chemistry, Theoretical, Practical and Analytical as applied and relating to the Arts and Manufactures by James Sheridan Muspratt from cca 1860 besides inorganic amides mentions also a peculiar substance "margaramid" that was obtained as a byproduct of ammonium salts of fatty acids preparation by treatment of fats/oils with ammonia. In this time e.g. acetamide was known as well already.

And the definition in Cyclopaedia of Chemistry with Its Applications to Mineralogy, Physiology, and the Arts from 1854 states:


  Amide, Amidogen. The term amide is given to a class of substances which contain ammonia deprived of an atom hydrogen, (NH2.) Hence, when they are treated with potash, ammonia is disengaged, the third atom of hydrogen derived from water again uniting, so as to form the necessary quantity in ammonia. That such a substance as amide or amidogen exists, may be proved by passing dry ammonia over heated potassium or sodium. A green body is formed, as hydrogen is evolved, which is replaced by the metal, NH2H + Na, becoming NH2Na and H. Some of the most familiar of these amides are potassamide NH2K, sodamide NH2Na, oxamide NH2C2O2, benzamide NH2C14H5O2, sulphamide NH2SO2, carbamide NH2CO, platosamine NH2Pt. Some of these amides are formed by heating organic salts of ammonia, by which they lose water, and leave an amide. Thus oxalate of ammonia, when distilled, gives water and oxamide (NH3C2O3 = NH2C2O2 and HO). It is probable that many animal substances, as albumen, belong to this class.


(typos/mistakes included)  

Please note that this is not an exhaustive historic research at all :)