Fix TabLayout setSelection() issues with custom views DO NOT MERGE ANYWHERE

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
(cherry picked from commit ed4b3d49f03292ccc92bef64f34116426aa1096f)
2 files changed