A number of places depend on RefPtr.h providing this function. When we
s/RefPtr/nsRefPtr/, such places still need to be able to see this
function. Moving it to nsRefPtr.h makes it still visible before we
switch (since RefPtr.h includes nsRefPtr.h), and after we switch (since
every place that #includes RefPtr.h will now be #including nsRefPtr.h).
I put MOZ_HAVE_REF_QUALIFIERS in Attributes.h for lack of a better
place. I didn't especially want to make a whole new file for it.
To make the tree compile, support for moving RefPtr to nsRefPtr was
needed. I chose to put the definitions in RefPtr.h instead of
nsRefPtr.h because RefPtr.h looks to be included in fewer files, so I
preferred to bloat fewer files with the extra include.
For some reason operator!() wasn't necessary here, although it seems it
is for nsRefPtr.