LLD: make atoms in files non-const

Currently, member functions like File::defined() return an iterator for const atoms. But we don’t actually treat atoms as consts – we updates atoms in many places including the core resolver.

We have too many const_casts in our code. It just doesn’t make sense.

I’m making a change to make atoms non-const. Please hit reply if you have any concerns.

Not concerns, but still I want to add my $0.02
There was already some discussion about this, see the mail derived
from http://reviews.llvm.org/D8372
I'm all in favour of the change because it will allow me to rewrite
that patch in such a cleaner and better way (and enables future
optimisations).

Returning a non const iterator would be a nice change.

Shankar Easwaran

Looks like there’s no push-back, so I’ll start working on this. Before that, it looks like I have to simplify atom_collection and its iterators, so I’ll start off with that. Thanks!