[console] allow smart scrolling in console
There may be times when output is dynamically added to the console
(optimization log or such). Normally, you would like the console to
scroll to the bottom automatically as new data is added so you can see
the most recent data. However, there may also be times when you are
viewing data somewhere else in the viewport, e.g. by dragging the
scrollbar of the console, and you don’t want scrolling to happen
automatically. This is implemented in this patch.
Source coming from:
https://tips4java.wordpress.com/2013/03/03/smart-scrolling/) with no
copyright (see https://tips4java.wordpress.com/about/).
Change-Id: Id245931789922fe8268ee37c831e1175bfbe8397