Fix: check if address is local after onion lookup

Make the .onion address lookup before we check if the address is local
(in the loopback network range). By default, onion cookies are in that
range (127.42.42.x).

Signed-off-by: David Goulet <dgoulet@ev0ke.net>