Refactor|Client|Server: Split client-specific code from r_main.cpp

Most of r_main.cpp is client-specific, so all of that was moved to
render/viewports.cpp.