Make the sdl module C code use the main thread

All video operations should be on the main thread, including
initialization. This makes no difference on my system, but
might on others. There is no cost doing this as these functions
are very rarely called, and usually before/after everything else.
Make sdl_surface:img_load/1 run in the main thread

While this and other surface functions don't need to, depending
on the backend or flags the surface may not be in system memory
and therefore may not be thread safe.
Add typespecs to the sdl module
Add typespecs to the sdl_clipboard module

The interface for sdl_clipboard:get_text/0 changed to be
easier to use as errors can happen.
Add typespecs to the sdl_cpu_info module
Add typespecs to the sdl_events module
Add typespecs to the sdl_filesystem module

Again the interface had to change a little to better distinguish
errors.
Add typespecs to the sdl_power module
Add typespecs to the sdl_renderer module
Add typespecs to the sdl_surface module
Add typespecs to the sdl_texture module
Add typespecs to the sdl_version module
Fix flag type in sdl_renderer
Add typespecs to the sdl_window module
Use a "better" type for the resources
Remove an arg check in sdl_renderer, use dialyzer instead!
Add ideas to the README
Add clicks value to mouse button events (SDL >= 2.0.2)