Limit the number of attempts to launch bad content providers

Previously if a content provider gets killed/exits by itself
during launching, the system would keep retrying to launch it;
now limit the maximum attempts to 3 and give up after that.

Bug: 141020060
Test: atest CtsAppTestCases:BadProviderTest
Change-Id: Idcc308c2761c444b62c0edf377c78622dd1c39b5
2 files changed