Fixed incorrect doc comment for isPowerOf2.
Added nextPowerOf2 generic function.
Added tests for nextPowerOf2.
Added a failing test for nextPowerOf2.
Fixed integer overflow.