Edge diffraction, trace formulae and the cardioid billiard