CLOUDSTACK-6850: Return cpu cores, cpu speed and memory in listUsageRecords

Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
Fixed issues reported by coverity NPEs, unwritten field access and self assignment

Signed-off-by: Koushik Das <koushik@apache.org>