Move viewInitialization code to C++ side

See also:
https://github.com/sailfishos/sailfish-browser/pull/236
https://github.com/sailfishos/sailfish-browser/pull/237