Fix RootCling arguments handling (reset once valid arg is found)

In the arguments check loop reset loop once a valid argument is
found, otherwise in case of an argument with value, the value will
be evaluated in the same iteration causing unexpected arguments
downstream.

E.g.,

    rootcling v4 -f dict.cc -cap cap.cxx <..>

It finds -cap options, reads capaFileName (cap.cxx) and increments
ic (argument counter) by 1. Yet we continue checking arguments
and at the end it pass through undesirabe options filter. Thus it
is added to clingArgs, which is wrong.

Signed-off-by: David Abdurachmanov <davidlt@cern.ch>
Signed-off-by: Philippe Canal <pcanal@fnal.gov>
Fix mismatched new/delete
Support case in genreflex when the header are not all first on the command line