Scientists used a smoking machine—complete with a 3-D-printed mouthpiece—to figure out how to get the most cannabinoid per puff.