Iraq attacks kill seven, inmate detonates explosives