Refactored dynamic encoder to use dynamic encoding.
Dynamic encoder updates.

- Moved detect encoding to its own module.
- Added default ctor and equality compare functions to dynamic_encoding_s.
- Added unit test for detect encoding.