Realcompactness and spaces of vector-valued functions