OpenGL screen tearing work-a-round
Fix calculation of physical memory on linux systems

As stated in the sysinfo manpage the totalram field in the sysinfo
structure is in mem_unit sizes since Linux 2.3.23. To get the actual
memory in the system the totalram value has to be multiplied with the
mem_unit size.
Fix crash in obs_get_video_info when video_output_get_info returns NULL
Fix creating textures from image data with flipping

When the image data is copied into a texture with flipping set to true
each row has to be copied into the (height - row - 1)th row instead of
the row with the same number. Otherwise it will just create an unflipped
copy.
Initialize graphics and unload modules in reverse order of the initialization and loading

The linux-capture plugin does trigger and X error when the xcomposite
capturing is destroyed. X then tries to call the error handler set in the
libobs-opengl video driver. If this is unloaded before the source plugins
is unloaded is causes a crash.
Merge branch 'fix_crash_on_video_init_error' into HEAD
Merge branch 'opengl_screen_tearing_workaround' into HEAD
Merge branch 'fix_creating_flipped_textures' into HEAD
Merge branch 'fix_shutdown_crash_on_plugin_unloading' into HEAD