[core] Properly handle empty layout in getFirstVisiblePosition()
[core] Implement getLastVisiblePosition() in TwoWayLayoutManager
[layouts] Add getLastVisiblePosition() method to TwoWayView