You should do the temporal filtering for each year within a mapped function over a list of the years you want the least cloudy image from. Do the spatial filtering first outside of the mapping function and you then perform the filtering and grab the first image within the function. This will result in an image collection with the least cloudy images from each year over your study area.
var years = ee.List.sequence(1990,2013)
var l5 = ee.ImageCollection('LANDSAT/LT5_L1T_TOA').filterBounds(table)
var leastCloudy = ee.ImageCollection(years.map(function(i){
var t1 = ee.Date.fromYMD(i,1,1)
var t2 = t1.advance(1,'year')
return ee.Image(l5.filterDate(t1,t2).sort('CLOUD_COVER').first())
}))
print(leastCloudy)
Once you have your filtered image collection you can then perform whatever analysis on that.