allow Elektra to be compiled using mingw

fix cmakedefine
fix usage of HAVE_STDIO_H
split moremeta things (that are likely to move to a seperate library)
(and exclude it for WIN32)
exclude array and ksLookupBySpec for WIN32 (64bit not available?)
only add dependency from kdb-static to resolver-lock if needed
no environ for WIN32