Pedro Sanchez invokes Iraq war’s lessons, vowing Spain will not be 'complicit' in illegal hostilities