Adding support for parsing timeout

I added one new method to the RCGParser interface: parseWithTimeout(), and a small timeout check in each iteration of the parser loops. I don't think it will affect performance notably.

Also a new command line option -timeout