Prepare analyze for detection of timeouts
Reorder code slightly for clarity
Refactor summarize_results_html_snippet() in preparation for adding failure diagnoses