Fascinating. Ralph has shown us that there is one "optimum" for resolution and another for contrast. If we had an elliptical pinhole, optimum for resolution on one axis, and for contrast on another it might lead to some interesting and subtle effects.
The problem with this idea is that ALL portions of a pinhole (and also a lens for that matter) are involved with formation of an image. Therefore a particular position in a pinhole does not form the image of a particular portion of the image. So a noncircular pinhole will still result in a degraded image.
A rock pile ceases to be a rock pile the moment a single man contemplates it, bearing within him the image of a cathedral.