I've never used Sublime Text 2, but it looks like it might have promise... not changing from my Vim though {Grin}
The following SHOULD work for you to turn off Insert Mode when you lose focus, name it "stop_insert_on_focus_lost.py" and place it somewhere in your plugins folder.
Hopefully it'll work, had to scan the API and some of their example plugins to get the format and commands. (never seen ST2 before though... do I get points for grokking their API, Python & Vintage mode in a few minutes?)
import sublime, sublime_plugin
import os.path
class StopInsertOnFocusLost(sublime_plugin.EventListener):
def on_deactivated(self, view):
view.run_command('exit_insert_mode')