Fix TabLayout setSelection() issues with custom views

Also tidied up the addTab() logic so that we only
have one code path now.

Also moved all of TabLayoutTest to use @UiThreadTest

BUG: 29760031

Change-Id: I9bd2fb00daacaa07ff201a4d5f0b5c7f40cfab40
2 files changed