Improvements to building as shared lib on Windows

I wanted to play around with tinyxml2 but found that it didn't compile a working DLL as-were. Fixing that proved fairly straightforward, but I think I got carried away a little. :smile:

**Summary:**
* all classes now conditionally get marked with appropriate storage class specifier, e.g. *dllexport/dllimport* - this is necessary to compile a working DLL;
* CMakeList modified to emit necessary preprocessor definitions for conditional compilation;
* CMakeList expanded with options to build as shared lib (default, builds static if off), to build tests and to generate documents with Doxygen if it's available (use *docs* build target);
* setversion.py was rewritten to emit appropriate "include" files under *config* directory which are then consumed via native include mechanisms (tested with Python 2.7.x);
* xmltest.cpp now conditionaly includes io.h when compiling with MinGW - *io.h* is where MinGW puts *mkdir* fuction;

I've tested these changes with MSVC and MinGW/MSYS, and in both cases all tests run successfully