An RAF jet came within metres of hitting a drone being flown by a farmer near an airbase, a report has revealed.