librustc: adjust logic for cfg attribute and add not predicate.

This adopts the syntax from #2119. No more annoying workarounds involving wrapping in mods!