Let $f(x)$ be a quadratic polynomial such that $f(-4) = -22,$ $f(-1)=2$, and $f(2)=-1.$ Let $g(x) = f(x)^{16}.$ Find the sum of the coefficients of the terms in $g(x)$ with even exponents. (For example, the sum of the coefficients of the terms in $-7x^3 + 4x^2 + 10x - 5$ with even exponents is $(4) + (-5) = -1.$)