Fix type compatibility error

  * ast_decl.cc(ClassDecl::IsTypeCompatibleWith): Fix a bug when name
    collision happens.
  * ast_type.cc(NamedType::IsCompatibleWith): Fix a bug when checking
    the compatibility of an interface.

Signed-off-by: Hongjiu Zhang <zhanghj@umich.edu>