Update index.js

These modifications allow to save entities data after the creation of an entity in a .jhip file. 
This file can be loaded instead of manually typing all the information of an entity:
   yo jhipster:entity nameOfEntity.jhip
 It is useful when you make mistakes at the creation of a project, you can easily load good entity file from file and create again the wrong ones.
Merge branch 'patch-1' of github.com:Fazerty/generator-jhipster into Fazerty-patch-1

Conflicts:
	entity/index.js
Merge branch 'Fazerty-patch-1'
Added the ".json" suffix to the entity configuration file, so they have the right icons in the IDEs
Better formatting
Refactored the activation mail so that the controller/service decoupling is done correctly
Removed unneeded parameter
Refactored code to use lambdas