Fractal dimension of random invariant sets for nonautonomous random dynamical systems and random attractor for stochastic damped wave equation