Refactor config class

Move options parsing off the constructor to separate module
to make code more readable and easier to add new options.
Add missing config tests
Refactor config to receive JS object in constructor

Passing YAML string is not always convinient way to create desired
config file.
Add functional tests for config
Merge refactored config into master

New config class has better structure and test coverage, simplifies
adding new options.