Fix license headers and EOF newlines.
Replace tabs with spaces in T4 template.
End-of-line whitespace fixes.