From 1805 to 1847, Detroit was the capital of Michigan (first the territory, then the state). In which War was Detroit captured by the British