Optimal mixing and optimal stirring for fixed energy, fixed power, or fixed palenstrophy flows