Fix for 524 and add automatically discovery of NumPy module level scalars

- automatically discovery of NumPy module level scalars
- added auto_attributes to do the above

Now that I think of it, I wonder why this code should be special-cased for numpy.
typeinfer is already able to type Python constants and globals (I've refactored it a bit in #573, by the way).