[application] Add a multiple applications test

Add an in-browser test making sure that running of multiple applications within XWalk runtime process works correctly.
Besides this patch contains a fix of a crash on Application exit (crash had been discovered with the newly added test).
Merge pull request #1491 from pozdnyakov/Add_Multi_App_Test

[application] Add a multiple applications test