BAC-818: Migrate Math extension to use Swift storage

Use Swift as a storage for rendered ``<math>`` tags

* code cleanup
* debug logging added

@Wikia/platform-team