What is the definition of an opioid, beyond that it's something that stimulates opioid receptors?
First there was opium. Then the active components of opium (morphine etc.) were defined and called opiates. Then the receptors for opiates were discovered, along with their endogenous ligands (enkephalins etc.), and since those endogenous ligands were not derived from opium and indeed (being peptides) were not chemically related to opiates, a new term was needed. This term was opioid, and yes, the definition of an opioid is that it is something which binds to an opioid receptor. 

The perceived circularity lies in the shift of emphasis from the drug to the receptor as the central player - when the first binding studies were being done in the early 1970s the search was for opiate receptors, not opioid receptors.