Fix Quantity variance bounds checking

`aperture_photometry()` currently does not work when `error` is a `Quantity`.  This is because the variance is checked to be positive using `np.maximum(variance, 0)`, which never returns a `Quantity`.  This causes an error downstream by trying to assign a scalar to an element of a `Quantity` array.  The fix here is compare to a zero `Quantity` with the same units as variance when necessary.