Semistable sheaves on projective varieties and their restriction to curves