Fix integer overflow and divide-by-zero

Bug: 35763994
Test: ran CTS with and without fix
Change-Id: If835e97ce578d4fa567e33e349e48fb7b2559e0e
(cherry picked from commit 8538a603ef992e75f29336499cb783f3ec19f18c)

status_t AMRSource::stop() {
    CHECK(mStarted);

 delete mGroup;
    mGroup = NULL;

    mStarted = false;
 return OK;
}

status_t AMRSource::stop() {
    CHECK(mStarted);

 delete mGroup;
    mGroup = NULL;

    mStarted = false;
 return OK;
}
