[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.