Use app name from app.json for registering application
Use app name from app.json for registering application

Summary:
Currently when we change the app name in `app.json`, run `react-native eject` and then run the application, we get the following error `Application HelloWorld2 has not been registered`

<img src="https://user-images.githubusercontent.com/6805530/34646396-9a68ccd0-f38c-11e7-9a49-9f985dc20f14.png" width="33%" />

This PR picks up the app name from app.json while registering the application, which prevents the additional step for the user to change the app name while registering in the `index.js`

Tested using sinopia. The new app generated with the `react-native init HelloWorld` contains the changes made.

[CLI] [ENHANCEMENT] [index.js] - App name picked from from app.json for registering application.
Closes https://github.com/facebook/react-native/pull/17472

Differential Revision: D7788652

Pulled By: hramos

fbshipit-source-id: bf23318ae1994b06e5d5908f53818040db1ad5af

hammerandchisel/react-native,myntra/react-native,facebook/react-native,arthuralee/react-native,facebook/react-native,exponent/react-native,janicduplessis/react-native,exponentjs/react-native,hoangpham95/react-native,pandiaraj44/react-native,hammerandchisel/react-native,javache/react-native,hammerandchisel/react-native,exponent/react-native,exponentjs/react-native,myntra/react-native,facebook/react-native,pandiaraj44/react-native,exponentjs/react-native,exponentjs/react-native,facebook/react-native,pandiaraj44/react-native,janicduplessis/react-native,exponent/react-native,facebook/react-native,myntra/react-native,facebook/react-native,hammerandchisel/react-native,janicduplessis/react-native,facebook/react-native,exponentjs/react-native,hoangpham95/react-native,facebook/react-native,hoangpham95/react-native,javache/react-native,hammerandchisel/react-native,arthuralee/react-native,javache/react-native,hoangpham95/react-native,myntra/react-native,exponentjs/react-native,exponentjs/react-native,myntra/react-native,janicduplessis/react-native,javache/react-native,javache/react-native,myntra/react-native,javache/react-native,janicduplessis/react-native,exponent/react-native,janicduplessis/react-native,janicduplessis/react-native,exponent/react-native,myntra/react-native,pandiaraj44/react-native,arthuralee/react-native,arthuralee/react-native,myntra/react-native,facebook/react-native,hoangpham95/react-native,javache/react-native,hoangpham95/react-native,hoangpham95/react-native,arthuralee/react-native,exponent/react-native,pandiaraj44/react-native,hammerandchisel/react-native,pandiaraj44/react-native,myntra/react-native,javache/react-native,janicduplessis/react-native,exponentjs/react-native,hoangpham95/react-native,pandiaraj44/react-native,hammerandchisel/react-native,pandiaraj44/react-native,exponent/react-native,exponent/react-native,javache/react-native,hammerandchisel/react-native