What happened to Upper and Lower Canada in 1840?