C++ compatibility

Only C++ errors are fixed, no functionality changed.

Code now compatible with Visual Studio 2008. I think it's a good chance to increase number of active developers.
True, but freeserf.h also contains various other defines like inventory_t. It is more like a place where various defines are put that don't have a better place right now. Is there any reason that you cannot just include freeserf.h at least temporarily? Feel free to address this issue in a separate commit where you move it to an appropriate file. Maybe there should be a resource.h file for the resource_type_t define but the other defines should be in appropriate files. In any case I don't think map.h is the right place to put resource_type_t since it is not related to the map.