Use the same-type variable in a loop, as in loop condition

This fixes (most of the) warnings like this:
darktable/src/common/cache.c:382:17: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
  for(int k=0; k<=cache->segment_mask; k++)
               ~^ ~~~~~~~~~~~~~~~~~~~
Merge remote-tracking branch 'upstream/master' into correct-forvariable-type
Merge branch 'correct-forvariable-type' of git://github.com/LebedevRI/darktable
Checking if unsigned variable < 0 is pointless
Remove unneeded ;
usermanual: a first step towards a more uniform typesetting (still a long way to go)
Merge branch 'master' of ssh://github.com/darktable-org/darktable
usermanual: a little bit more streamlining
Merge pull request #178 from LebedevRI/codefixes

Small code fixes