Using "who" twice, why?
The sentence
Sometimes it is the people who no one imagines anything of who do things that no one imagines.
...features an it-cleft construction with a cleft subject. A cleft sentence is a construction whereby a sentence is divided in two parts, each of them with their own verb, in order to emphasize a certain element – namely a subject, object, or adverbial expression. Verbs can be emphasized only in pseudo cleft-sentences.
An example of an it-cleft sentence would be:
She left => It was she who left.
The meaning is essentially the same but the emphasis can make a big difference. Depending on the context, the second version could come across as an accusation (e.g., "Everything that happened happened because of her. After all, it was she who left, wasn't it?"), among many other possible interpretations.
In the sentence at hand the canonical order would be The people do things that no one imagines. The clause who no one imagines anything of is just a relative clause whose antecedent is "people": The people who no one imagines anything of do things that no one imagines. If the speaker wants to emphasize the subject (the people who...), they can place it at the end of the sentence using a "dummy it":
It is the people who no one imagines anything of who do things that no one imagines.
Compare the "it" and the second "who" with those in "It was she who left". None of them were there in the canonical sentence but are necessary in the it-cleft version.
In conclusion, the first “who” is a relative pronoun introducing an adjective clause. The second “who” is whatever you call the pronoun you need in cleft sentences. As with most it-cleft sentences, you wouldn't put a comma between both fragments.
The phrase as quoted is natural and common amongst non-native speakers as well, and many other languages use a similar kind of 'referal system'. In this sentence, it just happens to be 'who' (as an objective) twice.
Consider the sentence without the 2nd 'who':
Sometimes it is the people who no one imagines anything of do things that no one imagines.
While you now have a 'who' to refer to those people that others imagine nothing of, there is nothing that 'doing the things no one imagines' points back to.
The second 'who' is not an antanaclasis here, and it can be replaced, for example, with 'that' (although it would not be the best choice here, seeing as it originally refers to 'the people'):
Sometimes it is the people who no one imagines anything of that do things that no one imagines.
Sometimes it is the humans that no one imagines anything of that do the things that no one imagines.
Alternatively, 'who' can be replaced with 'of whom', resulting in something like:
- Sometimes it is the people of whom no one imagines anything ...
This is to illustrate that 'who' is not an antanaclasis, seeing how an antanaclasis specifically requires the same word twice due to its double meaning or connonation.
No comma is needed in the sentence in it's current form (this site can explain why), though context can be imagined in which a comma can be used. Staying true to the phrase in context of the movie, it is fine without one.
I consider this fairly common but awkward. I think it would be acceptable to add a comma after the word "of," but I don't think it's necessary. If I were speaking, rightly or wrongly, I would likely substitute the second "who" with "that:"
Sometimes it is the people who no one imagines anything of that do things that no one imagines.
I do not believe this is an example of antanaclasis because the meaning does not change, at least with the limited context.