Metastable states in anisotropic spin glasses. I. Cubic anisotropy