Ensure in-place ops on Angles with non-angle result do not corrupt the instance

Currently, for an inplace operation on an Angle, an exception is raised if the result unit is not an angle unit, but this happens after the instance has been corrupted (see below). This PR solves this by checking an output instance is of the right class for the result unit.
```
In [1]: import astropy.units as u, numpy as np; from astropy.coordinates import Angle, Longitude, Latitude

In [2]: a = Angle(60., u.deg)

In [3]: np.cos(a, a)
...
UnitsError: Given unit  is not convertible to an angle

In [4]: a
Out[4]: <Angle 0.5000000000000001>
```

With this PR:
```
In [1]: import astropy.units as u, numpy as np; from astropy.coordinates import Angle, Longitude, Latitude

In [2]: a = Angle(60., u.deg)

In [3]: np.cos(a, a)
...
TypeError: Cannot store output with unit '' from cos function in <class 'astropy.coordinates.angles.Angle'> instance.  Use <class 'astropy.units.quantity.Quantity'> instance instead.

In [4]: a
Out[4]: <Angle 60.0 deg>
```