ARQGRA-262: race condition fixed

The bug has been caused by the following scenario:
1. javascript extension is requested
2. executor checks whether the extension is installed -> it isn't
3. executor installes the extension
4. again, executor checks whether the extension is installed -> it is
5. new page is loaded (all installed extensions are dropped)
6. the extension is invoked -> but it isn't installed -> FAIL

The invocation process has been refactored to avoid this type of race condition:
1. javascript extension is requested
2. try to invoke the extension
3. if the invocation throws an exception, install the extension