Don't always invalidate the whole gutter

Instead, invalidate the whole lines gutter renderer only when needed.

This should prevent degenerate cases where the gutter window is being
continuously invalidated during certain operations, for example search.

This is needed to have decent search performances on Mac OS X (but this
is not the root cause why the search was really slow on OS X, it is
probably because drawing is much slower than on Linux).