Several patches for the OpenChange integration

Without this patches Sogo won't work against the next version of OpenChange that will be released soon. Please review them and merge.

Thanks!