Fix crash with TableView on android and show alternating rows when empty

We were dividing by 0 when there were no visible rows on android.
This fixes the issue and ensures there are alternating rows also
when the view is empty.

Change-Id: I1ed84235418d50ed476a7424285c52446a355095
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>