On convexity properties of the spectral radius of nonnegative matrices