Magnetic states of small cubic particles with uniaxial anisotropy