Invexity of quadratic functions and restricted/local invexity