CArchive: fix incorrect streaming of size_t (alternative)

`size_t` is not equal to `unsigned int` on some platforms.
Instead of narrowing it to smaller size, support correct streaming of all integers sizes.

This is an alternative for PR #3705