The ability to squint and focus - what is it called and is it used in optics? Most people that wear glasses or contacts can squint to reduce the blurriness of their vision.
How can this be explained, and has it ever been used in optics to enhance the focus or clarity of an image?
 A: As far as the second part of your question is concerned you can directly see the image improvement with squinting. If you have a DSLR with aperture settings you keep the camera slightly defocused and now reduce the aperture you will see that the image is becoming sharper. However at the same time the image will become darker because you are collecting less and less light. 
The sharpness of image comes from the increase in so called depth of focus of the lens. Due to reduction in the collection efficiency this method is not well suited for the practical applications.
With the reduction in aperture you will also reduce various aberrations of the lens which will again improve the image quality. 
A: EDIT Please see the comments following my answer, regarding the paragraph below , as it is incorrect. 
Strabismus is the clinical name for squinting. The squint is simply compression  of the eye muscles to compensate for problems with focusing and / or astigmatism. 
END EDIT 
In a somewhat similiar way, telescopes using adaptive optics can distort the primary mirror to allow for distortion due to atmospheric turbulence.  Computer controlled jacks distort the mirror to achieve the best possible image, as illustrated in the diagram at the bottom of this answer.

A laser beam is used as a guide to the amount of turbulence in the upper atmosphere.
The efficiency  of the system is shown below.

From Wikipedia Adaptive Optics

An adaptive optics system tries to correct these distortions, using a wavefront sensorwhich takes some of the astronomical light, a deformable mirror that lies in the optical path, and a computer that receives input from the detector. The wavefront sensor measures the distortions the atmosphere has introduced on the timescale of a few milliseconds; the computer calculates the optimal mirror shape to correct the distortions and the surface of the deformable mirror is reshaped accordingly. For example, an 8–10 m telescope (like the VLT or Keck) can produce AO-corrected images with an angular resolution of 30–60 milliarcsecond (mas) resolution at infrared wavelengths, while the resolution without correction is of the order of 1 arcsecond.


