Attitude Stabilization of Spacecraft Using Moving Masses