Fixed #2839 and #2981 (anomaly NotASort in retyping). Was due to
collision between two variables of same name, but finally made a
slightly different implementation of sort_of_atomic_type.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/branches/v8.1@16189 85f007b7-540e-0410-9357-904b9bb8a0f7