Why does my functions.php cause white-screen and media-library issues?

The first line is just an HTML comment outside the scope of PHP. It’ll output with every response and creates all the kinds of headaches you’re experiencing.

Solution? Remove it, or make it a PHP comment:

<?php    
/* In a child theme, all of the functions of the parent theme are present, unless   overridden here */

You should also make sure there’s no whitespace either side of PHP tags, as described here.