How did the loss at the Battle of Waterloo directly contribute to the end of Napoleon's empire?