ellipsize window title if it's length is longer than 100

I'm adding the ellipsizeString and ellipsizedWindowTitle functions at top level because I'm unsure where they would likely fit.

Maybe, consider making the 100 magic value a custom setting.
Merge pull request #1 from smoothdeveloper/master

ellipsize window title if it's length is longer than 100