Refactor: Extract function oval_probe_query_var_ref
Refactor: Extract function oval_probe_query_var_ref

This commit extracts a part of code which handles references to variables
and moves the code to a new separate static function.
The purose of this commit is to make the function oval_probe_query_criterion
more understandable.

mpreisler/openscap,jan-cerny/openscap,mpreisler/openscap,ybznek/openscap,OpenSCAP/openscap,mpreisler/openscap,Hexadorsimal/openscap,redhatrises/openscap,OpenSCAP/openscap,mpreisler/openscap,OpenSCAP/openscap,ybznek/openscap,redhatrises/openscap,mpreisler/openscap,Hexadorsimal/openscap,Hexadorsimal/openscap,jan-cerny/openscap,Hexadorsimal/openscap,ybznek/openscap,Hexadorsimal/openscap,redhatrises/openscap,redhatrises/openscap,OpenSCAP/openscap,ybznek/openscap,redhatrises/openscap,jan-cerny/openscap,Hexadorsimal/openscap,ybznek/openscap,OpenSCAP/openscap,jan-cerny/openscap,ybznek/openscap,jan-cerny/openscap,mpreisler/openscap,jan-cerny/openscap,OpenSCAP/openscap,redhatrises/openscap