Bug 836605: Cache mozIApplication wherever possible on critical startup path. r=jlebar