Fixed cleanup of multi handles

We were having major problems with leaking multi_handles. Our systems keep running out of open file descriptors, and we run this under Rapache so it causes buffer overflows and module crashes and core dumps. I have attempted to fix it.