[devel] Fixed a number of problems with 64-bit compilation reported by Visual

Studio 2010 (John Bowler).
26 files changed