synchronizes namer code with trunk

Paradise namer copy/pastes some pieces of trunk namer, because I didn't
find a way to reuse them without exposing half of the compiler. Therefore
from time to time we need to check that we don't diverge.