UAE beat Iraq to finish third at Asian Cup