LexerEngine class: added methods to manage snapshots.

LexerEngine class: Added a stack of snapshots and methods to manage it.
Snapshot allow to save and restore the execution state of the engine.