Make various setup function idempotent.

Seems that cc-mode will run its hooks twice, which will result
duplicates entries in "ac-sources" if using push.
Merge pull request #118 from xiaohanyu/master

Make various setup function idempotent.