Bowser, Thomas, Sir, 1748-1833, Knight, army officer in India