There are currently (at least) three is_power_of_2 functions. Replace them with one template function.
            
- relates to
- 
                    JDK-8239363 PPC64: Wrong code generation after JDK-8183574 -           
- Closed
 
-         
- 
                    JDK-8239861 [aarch64] assert(is_power_of_2(x)) failed: x must be a power of 2: 0xffffffff80000000 -           
- Closed
 
-         
 P4
  P4