Adding RectangularAnnulus aperture, and do_rectangular_photometry function

This PR logically belongs to the previous API refactoring:
 * it defines ``do_rectangular_photometry`` in ``aperture_funcs`` and moves the actual photometry computation from the ``RectangularAperture`` class, similarly to the other classes
 * defines ``RectangularAnnulus`` aperture class


@astrofrog - Sure, I'm actually in the middle of it (and also trying to
rebase it against your latest branches).

On 14 September 2014 17:18, Thomas Robitaille <notifications@github.com>
wrote:

> In photutils/aperture_funcs.py:
>
> > +                                                x_min[i]:x_max[i]] ** 2
> > +                            if gain is not None:
> > +                                subvariance += (data[y_min[i]:y_max[i],
> > +                                                     x_min[i]:x_max[i]] /
> > +                                                gain[y_min[i]:y_max[i],
> > +                                                     x_min[i]:x_max[i]])
> > +                            # Make sure variance is > 0
> > +                            fluxvar[i] = max(np.sum(subvariance * fraction), 0)
> > +                        else:
> > +                            local_error = error[int((y_min[i] + y_max[i]) / 2 + 0.5),
> > +                                                int((x_min[i] + x_max[i]) / 2 + 0.5)]
> > +                            fluxvar[i] = max(local_error ** 2 * np.sum(fraction), 0)
> > +                            if gain is not None:
> > +                                local_gain = gain[int((y_min[i] + y_max[i]) / 2 + 0.5),
> > +                                                  int((x_min[i] + x_max[i]) / 2 + 0.5)]
> > +                                fluxvar[i] += flux[i] / local_gain
>
> @bsipocz <https://github.com/bsipocz> - here and in the rest of this
> function, can you make of find_fluxvar as I've done now for the other
> functions, to avoid duplicating the error calculation code?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/astropy/photutils/pull/149/files#r17520652>.
>