You can disable it system wide. But it also works on a per-app basis: if you don't want the UI state restored, then just quit the app with Cmd+Option+Q (instead of the regular Cmd+Q) and OS X will not save the application state.
THANKS for letting us know about cmd-opt-q! I'll have to start using that all the time since it does seem like a potential security hole.
So you don't have to use the shortcut at all in that case.
Personally I prefer getting used to using it on a case-by-case basis. For example, when I leave work I tend to quit most apps on my laptop with Cmd+Option+Q, so that when I get home they don't re-open with work and I can start working on personal projects.
I'll just have to get used to cmd-opt-q.
defaults write com.apple.Terminal NSQuitAlwaysKeepsWindows -bool false
or something similar ought to do the trick