Add support for running in Freestyle Jobs


In order t record metrics from ant builds we need to be able to send
metrics from a freestyle project. This adds that support, however the
freestyle projects don't get test result actions unless junit xml files
are archived/recorded ( I think) therefore added in a null check before
sending any test statistics to avoid nullpointerexceptions 

Change-Id: Ieb8fc419b6b7068a74a5f1210d841e62f625310d