Understanding the Lifecycle of Flaky Tests and Identifying Flaky Failures