kmsrecorderendpoint: Finish internal thread execution on dispose call

Change-Id: If17877a370d143750dae96092990da821c83eb03