Simplify memory management around ews_sync_mi_flags() function

It's quite hard to follow memory management of the calls if the called
function sometimes frees the passed-in data and sometimes not, thus
the actual simplification here is to make it clear whom is responsible
for the memory free. It's always the caller now. This should also
avoid any memory leaks in the related code in the future.