Canning, John, 1775-1824, army official in India