Makefile: Fix shared library building on various OSes

Versioned for OS not in (Windows, Android), and create a .dll.a implib on Windows

This change is used by the GStreamer project with its continuous integration system based around Cerbero for the openh264 GStreamer plugin. This change has been tested on Mac OS X, Linux (Ubuntu/Fedora/Debian), Windows 32-bit and 64-bit (cross-compiled, mingw), and Android (cross-compiled).

(This re-sent pull request fixes some comments in mstorsjo's review, and the travis build problem with libgmpopenh264.so)