Update the Linux functionality to use ARCs and make the Mac match.

GLX contexts are not reference counted, so we must do the reference
counting ourselves, in Rust.