On cohomological dimension and depth under linkage