Complete return of metrics from analyses

While successful analyses returned metrics, unsuccessful analyses did
not - now they do (meaning we can have a fixed json return format).