Port over to latest incoming

The changes were fairly mechanical, and not too big. Mostly reinterpret_cast was
replaced with transmute_copy, and ptr::addr_of was removed. However, a clumsy
workaround had to be made to return a borrowed pointer to an SDL_Palette, as
an unsafe pointer. That code is probable buggy anyways but the fix should be
reserved for a later date.