resolve: fix redirection loops in compressed RR

Loops in RR compression were only detected for the first entry.
Multiple redirections should be allowed, each one checking for an
infinite loop on its own starting point.
Also update the pointer on each redirection to avoid longer loops of
labels and redirections, in names like:
(start) [len=1] "A", [ptr to start]

(David: rename variable to "jump_barrier" and add reference to RFC)
resolve: set error code on failure

Set the error code in case of incorrect name. This prevents continuing
and failing an assert(name) later on.