scoping forcetk library with a closure

Sorry for a long changelist because my editor removed all the extra trailing spaces. Look at the following lines for changes:

forcetk.mobilesdk.js: Lines 27-30, 41-50
smartsync.js: Line 82