Export rtsp-server library API in headers when we're building the
library itself, otherwise import the API from the headers.
This fixes linker warnings on Windows when building with MSVC.
Fix up some missing config.h includes when building the lib which
is needed to get the export api define from config.h
https://bugzilla.gnome.org/show_bug.cgi?id=797185
The return value type is defined with G_DEFINE_POINTER_TYPE,
and gi emits the following warning:
Invalid non-constant return of bare structure or union; register as
boxed type or (skip)