unittests for scanner; fixes to scanner definition; provide Input class that includes dtor to avoid memory leak (class generated by flexc++ lacks a dtor)