[lld][LayoutPass] An earlier commit moved the functionality so that Atoms would
be laid out by their ordinal overrides first, there was a bug that two atoms may 
get the same override index due to which atoms were not ordered properly. This
commit fixes the problem.

Now the atoms are ordered by 

- Section Position hints
- Atom override (Using layout-after/layout-before/in-group)
- Content Permissions
- Content Type
- File Ordinal

This also fixes the problem of running c++ static executables that 
was broken by an earlier patch.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@182494 91177308-0d34-0410-b5e6-96231b3b80d8