When an mpipe was being destroyed, each element in the array was being
freed, but the array itself was not. Free the array as well.
Also do some minor tidying up of mpipe_done().
Reported-by: Craig Dooley <craig@xlnx-x.net>