With regard to cap gains and earned income exclusion, I do not think you are exempt. The foreign earned income exemption is only for earned income (I.E. Wages) and only applies to federal taxes. Social security. medicare, medicaid, and capital gains tax, as well as state taxes if your state doesn't exempt you are not included in federal exemption...
http://www.irs.gov/publications/p519/ch09.html
In addition, now that we have reached 2013, with regard to rela estate capital gains, I believe if gain on sale of your house for $250K+ single, $500K+ married, there is an additional 3.8% obama care tax for medicare. Not sure where syngirl will throw that one. Not even sure if she considers medicare, ssn, and medicaid taxes or benefitts hahaha... If the cap gain is below no tax for obama care medicare.