who became emperor and declared brazil independence from portugal in 1822?