From the glittering stained glass in medieval cathedrals to modernist high-rises, windows have illuminated our buildings for centuries. But, argues Rachel Hurdley, the presenter of a new BBC Radio 4 documentary on the history of windows, they can also shed light on the past