Quantum dots and cuboid quantum wells in fractal dimensions with position-dependent masses