Implement Quantity.flat, so that it always returns Quantity

Currently, `q.flat` does not work: if iterating over it, or getting a single item, it returns a float:
```
import astropy.units as u
q = u.Quantity([1., 2., 3.], 'm')
q.flat[:2]
# <Quantity [ 1., 2.] m>  --> this is fine
q.flat[0]
# 1.0  --> this is not
for _q in q.flat: print(_q)
# 1.0
# 2.0
# 3.0  --> not good either
```
As `.flat` is used extensively in `MaskedArray`, this is needed eventually...

This PR fixes this by constructing a `QuantityIterator` class, which is used when the `flat` property is accessed. This procedure is inspired by that used in `MaskedArray`; if anybody has an idea how better to do this, most welcome...