network: Undefine existing gai_strerror definitions

This avoids warnings if there already exists a definition.

This is the case on windows, where the getaddrinfo isn't available
and linked to (and we use our fallbacks instead, which actually
try to use the proper getaddrinfo version if found at runtime),
but gai_strerror still exists as a define.
os_support: Add fallback definitions for stat flags

Mingw headers provide similar defines already (unconditional #defines,
without any #undef or #ifdef around it), while MSVC doesn't have
them.
random_seed: Only read /dev/*random if we have unistd.h

unistd.h is used for open/read/close, but if this header does not
exist, there's probably no use in trying to open /dev/*random
at all.
file: Only include unistd.h if it exists

It is included for the open/read/write/close functions. On
MSVC, where this header does not exist, the same functions
are provided by io.h, which is already included.

On windows, these functions are provided by io.h. Make sure
io.h is included if it exists, regardless of the setmode
function.
rtpdec: Include unistd.h only if found

This is required for gethostname. On windows, gethostname is
provided by winsock2.h, which is included by network.h.
configure: Check for the math function rint

Add a fallback implementation if it doesn't exist.
os_support: Undefine file IO functions before redefining

Mingw-w64 has similar defines already.

This avoids a number of warnings when building with mingw-w64.
network: Check for struct pollfd

We need to include winsock2.h here, to make sure we have the
real pollfd struct definition, if one exists, before defining the
fallback poll function.
os_support: Don't compare a negative number against socket descriptors

The fds are unsigned integers in the windows definition of struct
sockfds. Due to this, the comparison if (fds[i].fd > n) was always
false.
os_support: Rename the poll fallback function to ff_poll
network: Extend the fallback gai_strerror implementation to handle more error codes

This is useful if a proper getaddrinfo is loaded dynamically on
windows, while using the fallback implementation of gai_strerror.
network: Always use our version of gai_strerror on windows

Even if linking directly to getaddrinfo, use our version of
gai_strerror instead of the system's version. Microsoft explicitly
documents that their version of gai_strerror is thread-unsafe.
network: Try to load WSAPoll dynamically

This gives the advantage of using this function (instead of the
emulation via select) on systems where it is available, while
retaining compatibility with systems that do not have it.

This requires making our fallback pollfd struct and constants
match what windows would use, so that a build that doesn't have
the windows pollfd definition available at build time would work
if the WSAPoll function is loaded at runtime.
network: Load the getaddrinfo function pointers at startup

This avoids having to load them each time getaddrinfo is called.
avformat_network_init exists since the last major bump and should
be called for doing static library initialization before libavformat
is used by threads.
mathematics: Add MSVC compatible definitions of INFINITY and NAN

MSVC don't recognize the divisions by zero as meaning
infinity/nan.
attributes: Add a definition of av_always_inline for MSVC
converter: Add source conversion script
converter: Add a workaround for vorbisenc.c
converter: Updated converter program
converter: Revert update

This seems to break rtpenc.c and mpeg12.c.