Reduce complexity of PMA_getHtmlForTrackingReport().

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
Merge pull request #846 from Tithugues/reduceComplexity

Reduce complexity of PMA_getHtmlForTrackingReport().