Added template function select_if() in variant.h; Unit-tested.

when you make `select_if` static, this will look like `Variant::select_if(g_quals, high_gq);`