Add THaVar::IsVarArray()
Support specific elements of vararray variables in THaFormula

It is now possible to define formulas containing an expression like
"var[n]", where var is a variable-size array global variable and
n is any integer, regardless of the actual size of the array at
definition time. If n >= the size of the array at evaluation time,
var[n] evaluates to kBig. That's probably not quite yet what we want.
We actually want the whole formula to evaluate to kBig and/or report
something like IsValid() == false.

Putting just "var" in an expression is currently equivalent to "var[0]".
This leads to the issue of multi-valued formulas which needs additional
though.
Formulas/cuts now report being "invalid" if an array index is out of bounds

This will occur regularly if a formula contains a variable-size array
that happens to be empty or too small at evaluation time.

Also, make fVarDef much more memory efficient by using a std::vector.
(Breaks backward-compatibility, but the only users were (hopefully)
THaCut and THaVform.)

Add flag and test function IsArray() for array-type formulas.
Evaluating instances is not yet implemented.
Don't bother computing operand values if THaFormula already found invalid
Implement full array support in THaFormula

Formulas may now contain the names of arrays without subscript
(fixed and variable-size). This turns the formula into an array formula.

Array formulas report THaFormula::IsArray() == true.

The number of elements can be obtained via THaFormula::GetNdata().
If several different arrays appear in a formula, it represents, in general,
a matrix with as many dimensions as there are different arrays.
We adopt the simplification of ROOT and assume that such different arrays
are parallel. Each instance is calculated as the corresponding diagonal
element of the matrix, i.e. all arrays are evaluated at the same index.
Just as with ROOT's TreeFormulas, it is not possible to check whether the
arrays really are parallel - this is up to the user to ensure.
If different-size arrays are present, then the number of available elements
of the formula is the smallest of the arrays' respective sizes.

Elements can be accessed via EvalInstance(index), where
0 <= index < GetNdata(). If index is found to be out of bounds at
evaluation time, kBig is returned and the formula reports
IsInvalid() == true.

For backward compatibility, Eval() is equivalent to EvalInstance(0).

Also, revert GetExpFormula() back to the base class instance. TFormula's
version seems to do the right thing for THaFormula as well.

Example:

int* iarr = new int[3];  // CINT doesn't seem to handle stack arrays properly
iarr[0]=10;
iarr[1]=11;
iarr[2]=12;

vector<int> vi;
vi.push_back(100);
vi.push_back(200);
vi.push_back(300);
vi.push_back(400);

gHaVars->Define("iarr[3]",iarr);  // Fixed-size array formula
gHaVars->Define("vi",vi);         // Variable-size array formula

// Using a single array
THaFormula* f1 = new THaFormula("f1","2*iarr");
// Using parallel/identical arrays
THaFormula* f2 = new THaFormula("f2","vi+vi/10");
// Mixing arrays of different size
THaFormula* f3 = new THaFormula("f3","vi+iarr");

f1->EvalInstance(1)
22
f2->EvalInstance(3)
440
f3->GetNdata()
3
f3->EvalInstance(2)
312
Drop support for ROOT versions before 4.02/04 from THaFormula and THaCut

Quite a bit of conditional compilation cruft had built up to support
the old TFormula APIs. I think at this point it is safe to assume
that practically everyone is using ROOT 5 or even 6.
Use common THaFormula::Init() method for THaCut as well
Use TString, not C-string, for expression preprocessing in THaFormula::Init

Also, disallow all-whitespace formula names.
Let THaFormula::Init return a success code and use it to skip Compile on error
Split off code for registering THaFormulas to separate routine RegisterFormula
Add THaFormula::IsVarArray(). Make Is(Var)Array() virtual.
Implement THaCut array evaluation modes (AND, OR, XOR)

If the cut expression is an array, the cut expression is evaluated
for each array element. If the array is empty (variable-size array),
the cut evaluates to false. Otherwise, the cut result is the
AND, OR, or XOR of the tests of the individual elements. Here, XOR
means that the expression must be true for exactly one element.
Aliases for the modes are ALL, ANY, and ONE/ONEOF.

To specify the mode, prefix the cut expression with the mode and a
colon, for example

THaCut* cut1 = new THaCut("cut1", "OR:xarr>0", "DEFAULT");

If no prefix is given, the mode defaults to AND.

Resolves #58
Restore the workaround for buggy TFormula::GetExpFormula in old ROOT versions