Refactorize some stuff to make `dherkin_base.dart` io-agnostic so it can be imported in a browser app.
Refactored most of the private global variables in favor of dependency injection.