Fix various leak on GES. This MR doesn't include some tricky part and I'm planing to fix them in another MR.