David Miliband slams Gordon Brown’s failures