next_power_of_two()
Returns the smallest number that is both a power of two and larger or equal to x.