Fix misspelled CSS classes
Consolidate redundant code for SQL select/explain

The code for displaying the SQL select results and explain plan were nearly
identical, so this consolidates it to one function and template. It also fixes
correctly displaying the timing results as milliseconds.