initialize indexing backend according to openchangedb

openchangedb mysql backend will look for the backend url on the mailboxes table
fix unittest compilation issues
fix segmentation fault when the mysql initialization failed because sql schema didn't exist