[tools]Update stats.py to save the result in a csv file

Update the ref and bdd tests coverage
Update the Upstream test coverage
Output the result to coverage.csv
Merge pull request #1250 from chenxix/tools/modify-coverage-script

[tools]Update stats.py to save the result in a csv file