With the occupation by Napoleon, Portugal began a slow but inexorable decline that lasted until the 20th century. In what year did Brazil become independent from Portugal