std::rt: limit tasks to 2^16 on 32-bit and 2^32 on 64-bit