Fix for NaN coming in time attribute when test fails.

When a test fails, division of duration property computes to NaN. An attempt to submit a report containing time="NaN" to Sonar throws an error and report gets rejected. To make Mocha XUnit compatible with Sonar, I propose this amazing change! This will return 0 when tests fail.