Fix signed/unsigned warnings related to 'global.errors'

Most function local variables assigned to by global.errors are 'int'
while global.errors is of type 'unsigned'. For clarity 'unsigned int' is
used.
Fix signed/unsigned warnings in for-loops
Fix -Wunused warnings for variables in DMD_OBJS

Warnings reported by -Wunused fixed by either removing code or putting
it within the if-ifdef scope where the code is used.
Fix -Wunused warnings for assignment in if-statements

Warnings reported by -Wunused for variable assignment in if-statements.
Fix warnings about uninitialized values
Merge pull request #3598 from andron/fix-warnings

Fix minor warning issues