[application] HasMainDocument() should consider actual entry point.

Application::HasMainDocument() should consider the application entry point (whether
application has actually started from 'app.main') rather than just check presence of
this field in the manifest. Otherwise we'll have a bug if the manifest has an invalid
value at 'app.main' and the corresponding app has started from a different entry point.
Merge pull request #1530 from pozdnyakov/HasMainDocument_Rely_On_Entry_Point

[application] HasMainDocument() should consider actual entry point