The optimal planform, size and mass of a wing