""I swan" is generally used as the equivalent of "I do declare," which makes perfect sense since the two phrases are essentially professions of sincerity. "I swan" is apparently derived from the northern English dialectical pronunciation of "I shall warrant" (meaning "I shall be bound by my word; I promise I am speaking the truth"), which probably sounded like a slurred "I s'wan." The longer form "I shall warrant you," pronounced "I s'wan ye," gave us the form "I swannee" or "I swanny," still common in the South. None of this, of course, has any connection to actual swans.
Oddly enough, given their background, both "I swan" and "I swanny" are considered Americanisms and never gained much of a foothold in Britain. One reason for the continued use of "I swan" and its variants on this side of the Atlantic may be that, because of their initial consonants (that "sw" sound), they also serve as handy euphemisms for "I swear," an expression considered by many to be itself blasphemous. This would make "I swan" a member of the not-fooling-anybody group of euphemisms that includes such old standbys as "gosh" and "golly" (for "God") and "darn" for "damn."