Resonant particle production during inflation: a full analytical study