The term melee originates in the 1640s from the French word mêlée, which refers to disorganized hand-to-hand combat, a close-quarters battle, a brawl, or a confused fight; especially involving many combatants.
The 1812 tabletop war game, Kriegsspiel referred to the hand-combat stage of the game as a melee.  Later war games would follow this pattern. From there, gamers would eventually begin to call the weapons used in that stage melee weapons. 
Many weapons fit into multiple categories, or fit in between them; many polearms such as halberds, lucerne hammers and guisarmes add edged and blunt methods of attack to a spear base, and various hooked weapons such as billhooks, fauchards, falxes and becs de corbin evade easy classification; while flexible weapons such as whips don't fall into any of these categories.
The first point to be considered is the number of combatants on either side and the relative advantages under which they are fighting; the second the losses and duration of the melee
We did at last contrive to do so ; we invented what we call the melee, and our revised rules in the event of a melee will be found set out upon a later page