What was the spoils system and why did Jackson appoint government officials this way?