Database optimisations

Corrected a bug : text values could not contain quotes.
 - added escape functions
 - using escape functions in admin

Database optimisation :
 - Added indexes on fields concerned by front office access.