Fix mapping App, UserApp and UserAppId

Adding the App class in persistence.xml.
Correction on mapping of entities App, UserApp and UserAppId. Mapping
composite primary key was incorrect.