i-bem__dom: remove DOM before destructing BEM internals

closes #540

\cc @dfilatov @veged