CP-8888: Add diagnostic stats reporting

Signed-off-by: John Else <john.else@citrix.com>
CP-8888: Stop stats reporter before exiting

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1873 from johnelse/cp-8888

CP-8888: Add diagnostic stats reporting