who was the war of 1812 fought between