Log messages improvement

I'm trying to improve log messages on the following points:
  * Log level: adjust some level (ERR, DEBUG, ...) to be consistent with the other ones
  * Context: sometimes messages are not easy to understand without any context, for example ```Error parsing entity in 'cf_ace'``` Not easy to figure out this is from ACL stuff
  * Consistent reporting of underlying functions errors (fopen, acl_set_perm, ...)
  * Cosmetic changes to be also more consistent

Please do not merge at the moment, many commits are on the way :)