Fixed bug with layout mechanism

The bug occurs when the parent layout is resized (due to going to
fullscreen for exapmle). We then have to reperform calulations or
otherwise we end up with a screwed layout. The fix is to store the last
seen width and height in onMeasure() and keep another field called
sizeChanged next to angleChanged.