Anisotropic stars in general relativity