More than 20 Iraqi soldiers and the fighters supporting them have been killed in twin suicide attacks blamed on ISIL.