#139 Performance and memory use improvements

Added a forced garbage collection after every fifth polling cycle so
that the Java JVM doesn’t GC in the middle of analysing the screen, and
doesn’t let memory use get out of hand. Also limited memory use of the
OS X bundle to 192MB. Seems to be reducing long pauses in the JVM that
might be the cause of events being missed.
Merge pull request #141 from gtch/master

Performance and memory use improvements