Convert mysql_ to mysqli_

Using https://github.com/philip/MySQLConverterTool w/ some additional
cleanup