Rings close to periodic with applications to matrix, endomorphism and group rings