[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.