In fast_aks, rename has_square to is_power; fixed squarefree check