added a category method to get the average color from a UIImage