fix some compiler warnings

This pull request contains fixes to multiple warnings emitted by Clang when osm2pgsql is compiled with `-Wall`. Two of these cases (assignment instead of comparison, fixed in f1efada; and using `strtol` without including stdlib.h, fixed in 292dc6a) lead (or might lead) to errors in program logic; the others are mostly code hygiene.