Cracker when used as an insult is considered an offensive term, while fa***t is actually a historical term referring to railroad ties back in the late 1800's early 1900's. It wasn't really used widespread as a negative term until the late 50's early 60's and later.
Here's some historical definitions for those interested since it was also used as far back as 1590 for other definitions. Hopefully this clears up some misconceptions about it.
late 13c., "bundle of twigs bound up," also fagald, faggald, from Old French fagot "bundle of sticks" (13c.), of uncertain origin, probably from Italian faggotto "bundle of sticks," diminutive of Vulgar Latin *facus, from Latin fascis "bundle of wood" (see fasces).
Especially used for burning heretics (emblematic of this from 1550s), so that phrase fire and faggot was used to indicate "punishment of a heretic." Heretics who recanted were required to wear an embroidered figure of a faggot on the sleeve as an emblem and reminder of what they deserved.
"male homosexual," 1914, American English slang, probably from earlier contemptuous term for "woman" (1590s), especially an old and unpleasant one, in reference to faggot (n.1) "bundle of sticks," as something awkward that has to be carried (compare baggage "worthless woman," 1590s). It may also be reinforced by Yiddish faygele "homosexual" (n.), literally "little bird." It also may have roots in British public school slang noun fag "a junior who does certain duties for a senior" (1785), with suggestions of "catamite," from fag. This also spun off a verb (see fag).
He [the prefect] used to fag me to blow the chapel organ for him. ["Boy's Own Paper," 1889]
Other obsolete British senses of faggot were "man hired into military service merely to fill out the ranks at muster" (1700) and "vote manufactured for party purposes" (1817).
The explanation that male homosexuals were called faggots because they were burned at the stake as punishment is an etymological urban legend. Burning sometimes was a punishment meted out to homosexuals in Christian Europe (on the suggestion of the Biblical fate of Sodom and Gomorrah), but in England, where parliament had made homosexuality a capital offense in 1533, hanging was the method prescribed. Use of faggot in connection with public executions had long been obscure English historical trivia by the time the word began to be used for "male homosexual" in 20th century American slang, whereas the contemptuous slang word for "woman" (in common with the other possible sources or influences listed here) was in active use early 20c., by D.H. Lawrence and James Joyce, among others.
Another historical dissertation.
The term faggot or fagot, meaning bundle of sticks, shows up around 1300 in English. It almost certainly came from Old French, possibly going back to Greek phakelos. Since those bundles of sticks were mainly used for fires, it's not surprising that the term came to mean burning sticks. Then there was that nasty business in medieval times where heretics were burned at the stake. Some later cites indicate heretics who repented and were spared a fiery death had to wear a picture of a faggot on their sleeve to show what might have been their fate. But no print evidence exists that homosexuals were referred to as faggots before the twentieth century, with the origin definitely in the U.S., not Britain.
The British continued to use the words fag and faggot as nouns, verbs and adjectives right through the early 20th century, never applying it to homosexuals at any time. To fag or to be a fag was a common term in British schools from the late 1700s and referred to a lower classman who performed chores for upperclassmen. While this term was also in vogue at Harvard in the first half of the 19th century, it died out by the mid-1800s in the U.S., leaving it in use only in England. Nineteenth century Britons also heard "faggot" used in reference to an ill-tempered woman, i.e., a ball-buster, a battleaxe, a shrew. That meaning of the term continued into the early 20th century, and the usage was gradually applied to children as well as women. The relationship, if any, between faggot-as-bundle-of-sticks and faggot-as-shrewish-woman is unknown.
The first known published use of the word faggot or fag to refer to a male homosexual appeared in 1914 in the U.S. It referred to a homosexual ball where the men were dressed in drag and called them "fagots (sissies)." Ernest Hemingway, in The Sun Also Rises (1926), included the line, "You're a hell of a good guy, and I'm fonder of you than anybody on earth. I couldn't tell you that in New York. It'd mean I was a faggot." A 1921 cite says, "Androgynes [are] known as 'fairies,' 'fags,' or 'brownies.'"
George Chauncey, in his excellent 1994 work Gay New York: Gender, Urban Culture, and the Making of the Gay Male World, 1890-1940, says that the terms fairy, faggot, and queen were used by homosexuals to refer to men who were ostentatiously effeminate. Homosexuals who were not as showy referred to themselves as "queer" in the first decades of the 20th century. But the general public mainly called homosexuals "fairies." If you were in London in the 1920s through the 1940s and used the term "fag," the man in the street might have offered you a cigarette, and quite possibly that would have been the case with many Americans at the time.
All of this does little to answer your original question: How did a bundle of sticks come to mean a homosexual male? Most likely it didn't. Here we'll have to go to theory. Since I'm writing this, mine will have to do.
We notice with some words a progression of usage that morphs along the lines of "woman/girl" > "woman/girl/child" > "effeminate male" > "homosexual male." The word fairy is a good example. "Faggot" in the sense of an ill-tempered woman is another. I independently came to that conclusion while answering a general question on the SDMB. But, in a post to the American Dialect Society mailing list, Dr. Laurence Horn, professor of linguistics at Yale University, posted the progression that I just used (he did it much more succinctly than I could). Still unexplained is how a Britishism jumped the ocean in a short period of time to acquire a new meaning in the U.S. Perhaps it was an independent formation. Words happen.
As a last thought, a current notion holds that the Yiddish word faygeleh, "little bird," might have been the source, but lacks evidence other than the claim that the word was commonly used in Yiddish prior to WWII to indicate a homosexual. With the digitizing of publications allowing searching never before possible, perhaps some further scholarship will be forthcoming to help solve the mystery.
Resources: Random House Historical Dictionary of American Slang, edited by J. E. Lighter, New York, 1994-1997.
— samclem