Zero is not a power of two. Fix #1047

Also, fixed some docstrings and added {.noSideEffect.} pragma to nextPowerOfTwo().
Fix typo in previous commit.
Removed trailing ';'.
Merge pull request #1071 from ReneSac/devel

Zero is not a power of two. Fixes #1047