Fixes to SqlServer script logging

When script output logging is enabled on the SqlScriptExecutor, it blows
up on statements that don't return any rows (InvalidOperationException:
"sequence contains no elements" from the Max call). It also spews a lot
of noise on scalar statements (prints parts of the empty header table).
Fixed those issues. Also cleaned up the case where the header table is
malformed when a column name is longer than the row data in each column
(including when there's no row data).