rich cotton planters _ their fortunes secure thanks to the cotton gin , invented by eli whitney , who had come to savannah from yale to teach on a cotton plantation _ built many of the ornate homes encircling the squares .