Add withIsolatedRequireJSAndViewsMocked() function to test helpers

[#45143279]

It's a convenient way to speedup (and sometimes make work correctly)
test which create interactive controller. First, it mocks view
dependencies which cannot work in node.js environment. Second, it
mocks SemanticLayout, which extensively manipulates DOM elements using
jQuery, what is really slow in node.js + JSDOM environment.

So, if your tests are really slow (about >1s for single test), you
probably want to use this function.
Optimize slow mocha tests using withIsolatedRequireJSAndViewsMocked()

[#45143279]

Commit diff can look messy due to necessary indentations change, but
in most cases, it was just as simple, as adding a single line at the
beginning of a file:

helpers.withIsolatedRequireJSAndViewsMocked (requirejs) ->
Move semantic layout configuration to a separate module

[#45143279]

First, it clarify things a little bit. Second, tests which need that
layout is initialized (so various view containers are attached to
current document), but do not care about layout quality, will be able
to modify this config and speedup layout algorithm.
Optimize last slow mocha test

[#45143279]

This time we can't simply use withIsolatedRequireJSAndViewsMocked, as
we need layout module to attach view elements to the document.
However, we do not care about the layout quality, so we can require
and modify the layout configuration using layout config module. It's
enough to limit maximum number of allowed layout algorithm iterations
to speedup test significantly.
Remove workarounds for slow Mocha tests

[#45143279]

After optimizations all tests have a decent execution time, so remove
previous workarounds.