#4289 Move isPowerOfTwo to THREE.Math and update all references

The isPowerOfTwo function is declared in a lot of places, this Pull Request declares this function in THREE.Math and updates all references/removes remaining declarations.

Closes #4289.