I agree with Piscean's interpretations here but I would say they have significantly different meanings/uses. 2 is much less likely.
I think it's important to be aware that "to have visited" in "I intended to have visited London last year" doesn't indicate a past time previous to the past time of "intended." The proof of that is that we can't say things like "[strike]
I intend to have visited London last year[/strike]" where "intend" is in the present. One can't intend things about the past, whether the intending spoken of occurred in the past or occurs in the present.
Consequently, the perfect infinitive ("to have visited") must not be functioning to indicate past time, or an earlier past time relative to a later past time. I maintain that, instead, it is functioning to indicate that the intention was not realized. Notice that we can say, "I intended to visit London last year, and I did", just as we can say, "I intend to visit London next year, and I shall", but we (surely) can't say,
*? "
I intended to have visited London last year, and I did."
With "I had intended to visit London last year," I think two interpretations are possible, one being the interpretation Piscean gave. Let's change "last year" to "yesterday": "I had intended to visit London yesterday." Piscean's interpretation works in contexts like this: "I had intended to visit London yesterday, but then I decided to do something else." But suppose the speaker's intention didn't change. Then, I believe, "had intended" indicates that the planned visit to London didn't occur.
Can we say,
*? "
I had intended to visit London yesterday, and I did." I don't think so.