Tupac Shakur was a deeply political artist, shaped by the radical left-wing traditions of black America. A new biography finally does justice to this side of his life and work.