Make file formatting comply with POSIX and Unix standards
UTF 8, LF, and no BOM are all recommended for file formatting. These settings are the most compatible with various tools and also take up the least amount of space (CRLF -> LF in a file means saving one byte per line, and no BOM saves two bytes per file). If the whole file has diffs, that's CRLF -> LF.
The POSIX standard for text files says that each text file should end with a newline, otherwise it is by definition not a text file. GitLab shows a warning when a file is committed without a terminating newline (see "\ No newline at end of file" in the "before" diffs of this PR), and GCC shows warnings when compiling files that don't end with newlines. See this SO question and this Unix SE question for more information.
I made sure to only change this where I'm confident it's a good chance, including C++ files, HTML/CSS files, and plain text files.