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

add doxygen documentation (very important for such a useful function)