Return new optics from addPupil, addImage, addRotation, addDetector

*Needed for WebbPSF (see mperrin/webbpsf#25).*

The functions `addPupil`, `addImage`, `addRotation`, `addDetector` all return the optical elements they just added. This is not useful if you're passing in an OpticalElement subclass, but if you're creating FITS elements (or Rotations or Detectors) on the fly, this lets you retain a reference to the element added.