correctly handle namespace alias

remove the alias only it doesn't have qualifier, e.g.

namespace NS1 {
  void foo();
}

namespace cl = NS1;
void bar() {cl::foo(); }

On the other hand, we only need to remove NS2 (but keep cl)
in the following code:

namespace NS1 {
  namespace NS2 {
    void foo();
  }
}

namespace cl = NS1::NS2;
void bar() {cl::foo(); }