Fix behavior of round_to_power_of_2
When called on a value greater than 1llu <<63, round_to_power_of_2 will try to compute 1llu <<64, which is undefined.
This shouldn't be happening, since we only call this function in one place related to memory allocation, and we shouldn't be trying to allocate exabits of data anyway.
Still, better to fix it than not.
Similar to legacy/trac#6827 (moved) ; found while looking for similar problematic shifts.