Fix MSVC warnings, win64 bug

- Use qSort and function pointer instead of struct operators and std::sort
  to appease MSVC.

- Simplify DFInstanceWindows::map_virtual_memory loop

- Store real base address offset instead of reading 0x400000 from PE
  header.
Rip out scanners, has_flag.
Fix crash, remove some useless wrappers for "new".
Fix crash when looking at Skill Legend panel immediately on startup

It is possible for m_proxy to be unallocated immediately after startup.
This patch guards against this by checking m_proxy before use.
Fix Linux write_str, misc. backend improvements

- Since we don't have memory mapping anymore, hard-code the standard ELF
  base address with the assumption that DF will not get -fPIE any time
  soon.

- Rip out UCS-2 from CP437Codec and pre-register it.

- Remove some obsolete code and unnecessary includes.
Miscellaneous minor changes.
Refactor *nix code into DFInstanceNix, misc changes
update role calc, role prefs, custom role bug

- re-wrote role calculations to use new checks and transformations based
on thistleknot's latest role work
- added highlighting of which preferences are matched in roles, and
additionally listed the exact matches
- updated role preference names, and added a check to update general
material names on load
- updated roles to have proper member variables
- split the crop role preference category into crops (gather/grow) and
crops (grow)
- removed the 'wagon' creature from roles
- fixed a bug with role attributes rounding due to passing int instead
of double
- fixed a bug with roles where having invalid/bad weights resulted in
invalid ratings which caused drawing anomalies
update role weight struct, negative role weights

- highlight negative role weights in red
- minor update to the role's weight struct to make it more generic
Merge remote-tracking branch 'Hello71/DF2014' into DF2014
Merge remote-tracking branch 'stoutheart/DF2014' into DF2014
fix leaks

- fix caste body part leak
- fix 'leak' on exit from health categories (fixes #203)
fix minor stuff from last commit
fix minor coverity issues