Very often in information theory literature we see these two definitions (e.g., Aczel, J. and Daroczy, Z., 1975; Ebanks, Sahoo and Sanders, 1997)
$$ 0 \log 0 = 0,$$ $$ 0 \log \frac{0}{0} = 0.$$
I know that the limit $\lim_{p\rightarrow0} p\log\frac{p}{p} = 0$, however recently I became aware that the limit does not exist for all paths leading to $0^+$:
e.g.,
$$\lim_{p\rightarrow0} p\log\frac{p}{e^{-\frac{1}{p}}} = 1.$$
In this case, why are we allowed to make this definition, and what are the consequences to the proofs using this definition?
As you say, the second "definition", $0 \log \frac{0}{0} = 0$ is not justified if we interpret it in the sense $\lim_{x,y \to 0} x \log x/y =0$. This is not true, and you have provided an apt counterxample.
More in concrete, let $p_{i,n}$ $q_{i,n}$ be two families of distributions over $i = 1,2,3$, indexed by $n=1,2 \cdots$, such that $$p_{1,n}=2^{-n}, \quad p_{2,n}=p_{3,n}=\frac12 (1-p_{1,n}) $$ $$q_{1,n}=p_{1,n} \exp(-1/p_{1,n}), \quad q_{2,n}=q_{3,n}=\frac12 (1-q_{1,n}) $$
Then $p_{1,n}\to 0 $ and $q_{1,n}\to 0$ but $ p_{1,n} \log(p_{1,n}/q_{1,n})=1$ and in the sum $$ \sum_i p_{1,n} \log(\frac{p_{1,n}}{q_{1,n}})$$ the first term is the only that does not tend to zero.
However, those texbooks are not wrong. Because the definitions are not really about limits. It's about probability functions that could be zero for some values of its domain.
Consider these two pmf (over the domains $\{1,2\}$ and $\{1,2,3\}$ resp): $p_A=(\frac12,\frac12)$ $p_B=(\frac12,\frac12,0)$. These pmf are formally different. However, we consider them totally equivalent for all practical purposes. And it would be quite weird if some statistical measure (some functional of a pmf) we define would give different results for each of them. In particular, we strongly want that for the entropies: $H(A)=H(B)$. For that, the definition $H(X)=-\sum p(x) \log(x)$ must come attached with the convention $0 \log 0=0$. (The alternative would be restring the sum for $x\in D : p(x)>0$ but this would be clumsy).
So you see, it's not about limits. True, $\lim_{x\to 0} x \log(x)=0$ , but that's not the point. The fact that that limit holds, merely tells us that the above definition implies continuity , so if we have some sequence of pmfs $\lim p_n = p$ then $\lim H(p_n) = H(\lim p_n)= H(p)$. A nice result, of course, but not essential.
Coming into the other "definition": $0 \log 0/0=0$. This one comes attached with the KL definition $D(p||q)=\sum p(x) \log(p(x)/q(x))$, for the very same motives. We don't want the KL to change (or become undefined) if we trivially extend the (common) domain with points where $p$ and $q$ are both zero.
Now, as we have noted above, the limit does not necessarily agree with that definiton. But this only implies that the KL is not continuous, strictly speaking. It can happen (see example above) that $(p_n,q_n) \to (p,q)$ but $\lim D(p_n || q_n) \ne D(p || q)$. This is rather unfortunate, but not tragic and practically inconsequential.