Fix many implicit 32/64-bit data conversions

Fix many implicit 32/64-bit data conversions.

This avoids type conversion warnings in 64-bit builds.

These are mainly use of strtoul for parsing uint32_t without casting
the return value, or use of int or uint32_t when size_t is more
appropriate.

There are three APIs that we interact with that aren't using
size_t (SASL, MD5, and zlib) so we cast in and out of those.

Change encode_base64 to take size_t as its len parameter.
Change uid_cache_item.size to size_t.
Change chashdatum.len to be declared as size_t rather than unsigned int.
in mailimap_get_token_str_size() implementation, use `int i` instead of `size_t i`.